Archives

 

Hi !  Long time no talk...

 Well, I'm back on ANOTHER eConnect project.  This time it's eConnect version 8 (for Dyn GP 8).  I'm creating a Windows Service that polls an "export queue" table for invoices and repackaging the invoice to send it out via EDI.

 I've only ever used eConnect 9 and up but I assumed that the versions were similar.  Here's what I'm doing and where it's breaking...

1. My project is in VS2005.
2. I imported and am referencing Microsoft.GreatPlains.eConnect, MiscRoutines, and Serialization8 dll's.
3. I had to reference an "old" version of System.EnterpriseServices because eConnect v8 uses it.
4. For testing, I'm trying the following:

Dim serializer As New XmlSerializer(GetType(eConnectType))
Dim eConnect As New eConnectType()
Dim eConnectouttype As New RQeConnectOutType()
Dim eConnectOut As New eConnectOut()
Dim entrypoint As New eConnectMethods
Dim requesterDoc As String = String.Empty
Dim sConnectionString As String = GetGPConnectString()
With eConnectOut
    .DOCTYPE = "Sales_Transaction"
    .OUTPUTTYPE = 1
    .INDEX1FROM = "INV92029"
    .INDEX1TO = "INV92029"
    .FORLIST = 1
End With
...

My code is failing on the bolded line (Dim entrypoint As New eConnectMethods) with the following exception: "The system cannot find the file specified. (Exception from HRESULT: 0x80070002)".  Here's the stack trace:

at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
at IntegrationExportService.ExportService.GetGPData(Int32 ExportPK, Int32 SOPType, String SOPNumber, String& xmlInvoice) in C:\Users\Joe Cogan\...\ExportService.vb:line 102

I cannot figure out why it would be failing when dimming Microsoft.GreatPlains.eConnect.eConnectMethods.  All of the references and dll's are in place.  Have you seen this before?  Your insight will be greatly appreciated.  Thanks!

Joe Cogan
joecogan@adelphia.net
c:  216.288.1488

From a recent email: 

In reading some of your posts, it appears that VSTools for GP is not the best tool to use to generate a multi-line sales order from an external data source. Am I correct? Is the best tool (in your opinion) eConnect? Does it provide validation/defaulting based on GP setup?
Thanks.
Seth

 

 

Hi All,

When am doing an entry for distribution via eConnect code the Debit entry is going as double.

Code Example:

PMTransactionType PAInvoiceEntry = new PMTransactionType();

taPMDistribution_ItemsTaPMDistribution NonPrjDisDebit = new taPMDistribution_ItemsTaPMDistribution();

taPMDistribution_ItemsTaPMDistribution NonPrjDisCredit = new taPMDistribution_ItemsTaPMDistribution();

taPMDistribution_ItemsTaPMDistribution[ NonProjDis = new taPMDistribution_ItemsTaPMDistribution[1];

taPMTransactionInsert PMHeader = new taPMTransactionInsert();

 

NonPrjDisDebit.DOCTYPE = 1;

NonPrjDisDebit.VCHRNMBR =
"10010";

NonPrjDisDebit.VENDORID = "00011";

NonPrjDisDebit.DISTTYPE = 6;

NonPrjDisDebit.ACTNUMST = "39701-50";

NonPrjDisDebit.DEBITAMT = 70.25m;

NonProjDis[0] = NonPrjDisDebit;

PAInvoiceEntry.taPMDistribution_Items = NonProjDis;

 

PMHeader.DOCTYPE = 1;

PMHeader.BACHNUMB =
"eConnect";

PMHeader.VCHNUMWK = "10010";

PMHeader.VENDORID = "00011";

PMHeader.DUEDATE = "06/11/2008";

PMHeader.DOCNUMBR = "DOCB";

PMHeader.DOCAMNT = 70.25m;

PMHeader.PYMTRMID =
"N30";

PMHeader.VADDCDPR = "PRIMARY";

PMHeader.DOCDATE = "06/10/2008";PMHeader.PSTGDATE = "06/10/2008";

PMHeader.PRCHAMNT = 70.25m;

PMHeader.CHRGAMNT = 70.25m;

This code is working fine but only problem is when i check in distribution amount Debit entry is showing as 140.5 $ which id double. what could the reason?

If anyone has faced the same please reply.

Thanks

Arvind 

I am currently looking into the possibility of opening a Dynamics window from an external application.  If possible we would like to have the ability to click on a hyperlink in a report that will open a specific dynamics window (assuming Dynamics is currently open). If anyone can possibly steer me in the right direction if this can be done I would greatly appreciate it.

 

Thanks,

Mike

 

I have been asked to get the customer balance and the last payments of a customer for a particular month, so I don't think I can use the values in rm00103.  I guess what I'm wanting is a way to say give me the sum of the payments for the month of May, and the previous balance at the end of May.  Is this possible?

 Thanks,

Brad

Hi, all

             I am very new to this concept and the ERP of microsoft. I really do not know where my query fits into, if iam at a wrong place hope you guide me to right place.

                coming on to my query, i have an application which uses MYSQL as its Database. It generates a data which is stored in a table. The requirement now is, i want  to  migrate the Data in this particular table to the Data base of MS GP, may be  i need to create a new table in the GP itself to accommodate this new data. Will i be able to achieve this, if so then how? Do i need to use eConnect to achieve my purpose or are there any other tools which will help me in achieving this task, like some adapters provided by MS GP. I am keen on seeking a suggestion.

Regards
 

Edit 9/16/15 View the main article for this error here 

I'm trying to post a return through eConnect, but I receive the following errors:

Error Number = 1526  Stored Procedure taSopSerial  Error Description = The Serial Number has already been sold - please choose another Serial Number

Error Number = 2905  Stored Procedure taSopSerial  Error Description = Qty fulfilled can not exceed qty allocated

Edit 9/16/15 View the main article for this error here 

Error Number = 1532  Stored Procedure taSopSerial  Error Description = The Serial Number (SERLNMBR) has already been selected for the entered item

Not really sure what to make of the errors.  The first error mentions that the serial has been sold.  This is true, but it is being returned so I don't see how that is relevant.  As for the quantity, I specified in GP that one item would be returned, and specified the serial number.  Only one item is being returned, and the serial number in the taSopSerial matches the serial specified on the return in GP.  The following is the XML that is being sent up:

 

<?xml version="1.0" encoding="utf-8" ?>
- <eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <SOPTransactionType>
- <eConnectProcessInfo>
  <ProductName>GP eConnect Interface</ProductName>
  <Version>9.0</Version>
  </eConnectProcessInfo>
  <taRequesterTrxDisabler_Items xsi:nil="true" />
  <taUpdateCreateItemRcd xsi:nil="true" />
  <taUpdateCreateCustomerRcd xsi:nil="true" />
  <taCreateCustomerAddress_Items xsi:nil="true" />
- <taSopSerial_Items>
- <taSopSerial>
  <SOPTYPE>4</SOPTYPE>
  <SOPNUMBE>RTN0008</SOPNUMBE>
  <LNITMSEQ>16384</LNITMSEQ>
  <QTYTYPE>2</QTYTYPE>
  <ITEMNMBR>TEST_SER</ITEMNMBR>
  <LOCNCODE>Warehouse</LOCNCODE>
  <SERLNMBR>4</SERLNMBR>
  <DOCID>RTN</DOCID>
  <UpdateIfExists>1</UpdateIfExists>
  </taSopSerial>
  </taSopSerial_Items>
  <taSopLotAuto_Items xsi:nil="true" />
- <taSopLineIvcInsert_Items>
- <taSopLineIvcInsert>
  <SOPTYPE>4</SOPTYPE>
  <SOPNUMBE>RTN0008</SOPNUMBE>
  <CUSTNMBR>TESTCUST</CUSTNMBR>
  <DOCDATE>6/23/2008</DOCDATE>
  <LOCNCODE>Warehouse</LOCNCODE>
  <ITEMNMBR>TEST_SER</ITEMNMBR>
  <UNITPRCE>2.50</UNITPRCE>
  <QUANTITY>1.0000000</QUANTITY>
  <MRKDNAMT>0.00</MRKDNAMT>
  <UNITCOST>2.50</UNITCOST>
  <QTYONHND>1.0000000</QTYONHND>
  <LNITMSEQ>16384</LNITMSEQ>
  <DOCID>RTN</DOCID>
  <INVINDX>000-1300-02</INVINDX>
  <CSLSINDX>000-4510-02</CSLSINDX>
  <SLSINDX>000-4190-00</SLSINDX>
  <MKDNINDX>000-1205-00</MKDNINDX>
  <RTNSINDX>000-1330-02</RTNSINDX>
  <INUSINDX>000-1520-00</INUSINDX>
  <INSRINDX>000-1300-02</INSRINDX>
  <DMGDINDX>000-4700-00</DMGDINDX>
  <UpdateIfExists>1</UpdateIfExists>
  <DEFEXTPRICE>1</DEFEXTPRICE>
  </taSopLineIvcInsert>
  </taSopLineIvcInsert_Items>
  <taSopLineIvcInsertComponent_Items xsi:nil="true" />
  <taSopTrackingNum_Items xsi:nil="true" />
  <taSopCommissions_Items xsi:nil="true" />
  <taSopLineIvcTaxInsert_Items xsi:nil="true" />
  <taCreateSopPaymentInsertRecord_Items xsi:nil="true" />
  <taSopUserDefined xsi:nil="true" />
  <taSopDistribution_Items xsi:nil="true" />
  <taSopMultiBin_Items xsi:nil="true" />
- <taSopHdrIvcInsert>
  <SOPTYPE>4</SOPTYPE>
  <DOCID>RTN</DOCID>
  <SOPNUMBE>RTN0008</SOPNUMBE>
  <LOCNCODE>Warehouse</LOCNCODE>
  <DOCDATE>6/23/2008 12:00:00 AM</DOCDATE>
  <CUSTNMBR>TESTCUST</CUSTNMBR>
  <BACHNUMB>ADMIN</BACHNUMB>
  <ORDRDATE>6/23/2008</ORDRDATE>
  <UpdateExisting>1</UpdateExisting>
  </taSopHdrIvcInsert>
  <taSopToPopLink xsi:nil="true" />
  <taSopUpdateCreateProcessHold xsi:nil="true" />
  <taCreateSOPTrackingInfo xsi:nil="true" />
  <taMdaUpdate_Items xsi:nil="true" />
  </SOPTransactionType>
  </eConnect>
 

Is it possible to load an existing document from a VS Tools add-in. I'd like to be able to load an existing sales transaction from an add-in to the Sales Transaction window. I think it can be done using the Dynamics.Forms.SopEntry.Procedures.DisplayDocument form procedure, but I'm not sure where to find the description of the parameters. Any help is welcome.

Thanks.

Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3