Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
kv 1/4/2016 11:17:53 AM

eConnect XML Error



So I managed to get a working eConnect solution in dev, have deployed to live and am getting the following validation error:


eCONNECT VALIDATION ERROR: Microsoft.Dynamics.GP.eConnect.eConnectException: Sql procedure error codes returned: 

Error Number = 4612  Stored Procedure= taPopRcptLineInsert  Error Description = Invalid Account Index
Node Identifier Parameters: taPopRcptLineInsert
POPRCTNM = R000033
ITEMNMBR = Laynards x 30
Related Error Code Parameters for Node : taPopRcptLineInsert
INVINDX = Note: This parameter was not passed in, no value for the parameter will be returned.


   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateEntity(String ConnectionString, String sXML)
   at RemoteServerTest.Program.PostXMLToDynamics()



Ihave attempted to add the INVINDX to the eConnect object, but for some reason this parameter does not serialise



My C# is 




                //Invoice Header Details
                invoiceHeader.POPRCTNM = invoice.SupplierDocumentNumber;    //receipt number placeholder
                invoiceHeader.POPTYPE = 3;                                  //Shipping/invoice
                invoiceHeader.VNDDOCNM = invoice.InvoiceNumber;             //invoice number
                invoiceHeader.CURNCYID = "GBP";                             //currency defaults to GBP
                invoiceHeader.TAXSCHID = invoice.TaxSchedule;               //Tax Code
                invoiceHeader.receiptdate = invoice.InvoiceDate.ToString("dd/MM/yyyy");
                invoiceHeader.USINGHEADERLEVELTAXES = 2;
                invoiceHeader.AUTOCOST = 1;
                invoiceHeader.BACHNUMB = batchNumberPlaceHolder;

                oPOPReceivingsType.taPopRcptHdrInsert = invoiceHeader;

                //Invoice lines

                oPOPReceivingsType.taPopRcptLineInsert_Items = new taPopRcptLineInsert_ItemsTaPopRcptLineInsert[invoice.InvoiceLines.Count];

                foreach (OutgoingInvoiceLine line in invoice.InvoiceLines)

                    taPopRcptLineInsert_ItemsTaPopRcptLineInsert ecLine = new taPopRcptLineInsert_ItemsTaPopRcptLineInsert();

                    ecLine.POPRCTNM = invoice.SupplierDocumentNumber;
                    ecLine.VENDORID = vendorReference;
                    ecLine.CURNCYID = "GBP";
                    ecLine.ITEMNMBR = line.ItemDescription;
                    ecLine.ITEMDESC = line.ItemDescription;
                    ecLine.UOFM = "Each";
                    ecLine.QTYINVCD = line.Quantity;
                    ecLine.QTYSHPPD = line.Quantity;
                    ecLine.UNITCOST = Decimal.Parse(line.UnitCost.ToString());
                    ecLine.EXTDCOST = Decimal.Parse(Convert.ToString(line.UnitCost * line.Quantity));
                    ecLine.Purchase_IV_Item_Taxable = 3;
                    ecLine.EXTDCOSTSpecified = true;
                    ecLine.UNITCOSTSpecified = true;
                    ecLine.NONINVEN = 1;
                    ecLine.LOCNCODE = "NO PROJECT";  //default Location Code
                    ecLine.RCPTLNNM = lineNumber;
                    ecLine.POPTYPE = 3;
                    ecLine.INVINDX = 0;

                    oPOPReceivingsType.taPopRcptLineInsert_Items[lineIndex] = ecLine;

                    totalTax += line.UnitCost * line.Quantity;

                //Invoice Tax
                invoiceTax.TAXTYPE = 0;
                invoiceTax.POPRCTNM = invoice.SupplierDocumentNumber;
                invoiceTax.VENDORID = vendorReference;
                invoiceTax.TAXDTLID = invoice.TaxDetail;
                invoiceTax.TAXAMNT = totalTax;
                invoiceTax.MSCTXAMT = Decimal.Parse("0.00");
                invoiceTax.FRTTXAMT = Decimal.Parse("0.00");

                oPOPReceivingsType.taPopRcptLineTaxInsert_Items = new taPopRcptLineTaxInsert_ItemsTaPopRcptLineTaxInsert[] { invoiceTax };






Having a look around I suspect this is a GL Account set up issue (difference between the databases) - but I can't actually see where I would set this within the XML

Version: GP 2010
Section: eConnect

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