web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

eConnect SOPTransactionType

(0) ShareShare
ReportReport
Posted on by 5

All,

I am new to Dynamics GP and I am attempting to use eConnect to post sales transactions (SOP) to our system.

I am using version 11 of eConnect with the GP 2010 Integration Service (coding in C#).  I am trying to mimic the sample provided but having problems.   The batch creation (SMTransactionBatchType) was successful, but during the CreateTransactionEnttity call for the SOPTransactionType object, it is throwing an eConnectException with the following message:   "Unable to cast object of type "System.DBNull" to type "System.String".

If I exclude the taSopLineIvcInsert node from the SOPTransactionType, the transaction is created with the User Defined information and Tracking Numbers (additional nodes).  As soon as I include the taSopLineIvcInsert node, I have the problem.   Below is the XML document which I am trying to post:   Any help would be appreciated.

 

===== XML Document

<?xml version="1.0" encoding="UTF-8"?>

<eConnect xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<SOPTransactionType>

<eConnectProcessInfo xsi:nil="true"/>

<taRequesterTrxDisabler_Items xsi:nil="true"/>

<taUpdateCreateItemRcd xsi:nil="true"/>

<taUpdateCreateCustomerRcd xsi:nil="true"/>

<taCreateCustomerAddress_Items xsi:nil="true"/>

<taSopSerial_Items xsi:nil="true"/>

<taSopLotAuto_Items xsi:nil="true"/>

<taSopLineIvcInsert_Items>

<taSopLineIvcInsert>

<SOPTYPE>3</SOPTYPE>

<SOPNUMBE>INV00000000000079</SOPNUMBE>

<CUSTNMBR>1744B</CUSTNMBR>

<DOCDATE>11/08/2012</DOCDATE>

<USERDATE>11/08/2012</USERDATE>

<LOCNCODE>PLANT</LOCNCODE>

<ITEMNMBR>PLUG-209-001-4</ITEMNMBR>

<UNITPRCE>15.0000</UNITPRCE>

<XTNDPRCE>15.0000</XTNDPRCE>

<QUANTITY>1.0000</QUANTITY>

<ITEMDESC>Hole Plug, 1" diameter, (1" depth), Graphite</ITEMDESC>

<DOCID>STDINV</DOCID>

<SLPRSNID>DOMW</SLPRSNID>

<PRSTADCD>BILLING</PRSTADCD>

<CNTCPRSN>Rick Gabel</CNTCPRSN>

<ADDRESS1>1855 N. First St. Suite D</ADDRESS1>

<ADDRESS2>SUITE D</ADDRESS2>

<CITY>Dixon</CITY>

<STATE>CA</STATE>

<ZIPCODE>95620</ZIPCODE>

<COUNTRY>United States</COUNTRY>

<PHONE1>5123506898</PHONE1>

<PHONE2>5123506898</PHONE2>

<PHONE3>1231234123</PHONE3>

<FAXNUMBR>5123506898</FAXNUMBR>

<ReqShipDate>10/12/2012</ReqShipDate>

<FUFILDAT>10/12/2012</FUFILDAT>

<ACTLSHIP>10/12/2012</ACTLSHIP>

<SHIPMTHD>UPSR</SHIPMTHD>

<INVINDX>1321</INVINDX>

<CSLSINDX>1321</CSLSINDX>

<SLSINDX>1321</SLSINDX>

<MKDNINDX>1321</MKDNINDX>

<INUSINDX>1321</INUSINDX>

<INSRINDX>1321</INSRINDX>

<DMGDINDX>1321</DMGDINDX>

<CURNCYID>Z-US$</CURNCYID>

<UOFM>EACH</UOFM>

</taSopLineIvcInsert>

</taSopLineIvcInsert_Items>

<taSopLineIvcInsertComponent_Items xsi:nil="true"/>-<taSopTrackingNum_Items>

<taSopTrackingNum>

<SOPTYPE>3</SOPTYPE>

<SOPNUMBE>INV00000000000079</SOPNUMBE>

<Tracking_Number>1Z4905X30151927437</Tracking_Number>

</taSopTrackingNum></taSopTrackingNum_Items>

<taSopCommissions_Items xsi:nil="true"/>

<taSopLineIvcTaxInsert_Items xsi:nil="true"/>

<taCreateSopPaymentInsertRecord_Items xsi:nil="true"/>-

<taSopUserDefined>

<SOPTYPE>3</SOPTYPE>

<SOPNUMBE>INV00000000000079</SOPNUMBE>

<USERDEF1>1Z4905X30151927437</USERDEF1>

<USERDEF2>Black Hole Plug/UC Davis - Hutchison Hall Room 172</USERDEF2>

<USRDEF03>L7345-1A1</USRDEF03>

</taSopUserDefined>

<taSopDistribution_Items xsi:nil="true"/>

<taAnalyticsDistribution_Items xsi:nil="true"/>

<taSopMultiBin_Items xsi:nil="true"/>

<taSopHdrIvcInsert>

<SOPTYPE>3</SOPTYPE><DOCID>INV</DOCID>

<SOPNUMBE>INV00000000000079</SOPNUMBE>

<SHIPMTHD>UPSR</SHIPMTHD>

<LOCNCODE>PLANT</LOCNCODE>

<DOCDATE>11/08/2012</DOCDATE>

<CUSTNMBR>1744B</CUSTNMBR>

<CUSTNAME>ISEC-Dixon</CUSTNAME>

<CSTPONBR>127427-12</CSTPONBR>

<ShipToName>ISEC CF# 1277427</ShipToName>

<ADDRESS1>1855 N. First Street</ADDRESS1>

<ADDRESS2>Suite D</ADDRESS2>

<CNTCPRSN>Todd Clapham</CNTCPRSN>

<FAXNUMBR>707-693-6570</FAXNUMBR>

<CITY>Dixon</CITY>

<STATE>CA</STATE>

<ZIPCODE>95620</ZIPCODE>

<COUNTRY>United States</COUNTRY>

<PHNUMBR1>707-693-6555</PHNUMBR1>

<USER2ENT>Status.NET</USER2ENT>

<BACHNUMB>RickTest22</BACHNUMB>

<PRBTADCD>BILLING</PRBTADCD>

<PYMTRMID>NET 30 Days</PYMTRMID>

<REFRENCE>1Z4905X30151927437</REFRENCE>

<DEFTAXSCHDS>1</DEFTAXSCHDS>

<CURNCYID>Z-US$</CURNCYID>

<COMMNTID>INVOICE</COMMNTID>

<DEFPRICING>1</DEFPRICING>

</taSopHdrIvcInsert>

<taSopToPopLink xsi:nil="true"/>

<taSopUpdateCreateProcessHold xsi:nil="true"/>

<taCreateSOPTrackingInfo xsi:nil="true"/>

<taMdaUpdate_Items xsi:nil="true"/>

</SOPTransactionType>

</eConnect>

 

Also, I turned on tracing and got the following :

eConnectTraceSource Information: 0 : 11/08/2012 13:22
   
Date and Time:                          11/8/2012 1:22 PM
TraceLevel:                             Verbose
Assembly Name:                          Microsoft.Dynamics.GP.eConnect, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
Assembly Location:                      C:\Windows\assembly\GAC_64\Microsoft.Dynamics.GP.eConnect\11.0.0.0__31bf3856ad364e35\Microsoft.Dynamics.GP.eConnect.dll
Loaded From Global Assembly Cache:      True
Runtime Version:                        v2.0.50727
ConnectionString Info:                  data source=sqltx2;initial catalog=test;integrated security=SSPI;persist security info=False;packet size=4096
TraceLevel:                             Verbose
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<?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 xsi:nil="true" /><taRequesterTrxDisabler_Items xsi:nil="true" /><taUpdateCreateItemRcd xsi:nil="true" /><taUpdateCreateCustomerRcd xsi:nil="true" /><taCreateCustomerAddress_Items xsi:nil="true" /><taSopSerial_Items xsi:nil="true" /><taSopLotAuto_Items xsi:nil="true" /><taSopLineIvcInsert_Items><taSopLineIvcInsert><SOPTYPE>3</SOPTYPE><SOPNUMBE>INV00000000000079</SOPNUMBE><CUSTNMBR>1744B</CUSTNMBR><DOCDATE>11/08/2012</DOCDATE><USERDATE>11/08/2012</USERDATE><LOCNCODE>PLANT</LOCNCODE><ITEMNMBR>PLUG-209-001-4</ITEMNMBR><UNITPRCE>15.0000</UNITPRCE><XTNDPRCE>15.0000</XTNDPRCE><QUANTITY>1.0000</QUANTITY><ITEMDESC>Hole Plug, 1" diameter, (1" depth), Graphite</ITEMDESC><DOCID>STDINV</DOCID><SLPRSNID>DOMW</SLPRSNID><PRSTADCD>BILLING</PRSTADCD><CNTCPRSN>Rick Gabel</CNTCPRSN><ADDRESS1>1855 N. First St. Suite D</ADDRESS1><ADDRESS2>SUITE D</ADDRESS2><ADDRESS3>CRAP</ADDRESS3><CITY>Dixon</CITY><STATE>CA</STATE><ZIPCODE>95620</ZIPCODE><COUNTRY>United States</COUNTRY><PHONE1>5123506898</PHONE1><PHONE2>5123506898</PHONE2><PHONE3>1231234123</PHONE3><FAXNUMBR>5123506898</FAXNUMBR><ReqShipDate>10/12/2012</ReqShipDate><FUFILDAT>10/12/2012</FUFILDAT><ACTLSHIP>10/12/2012</ACTLSHIP><SHIPMTHD>UPSR</SHIPMTHD><INVINDX>1321</INVINDX><CSLSINDX>1321</CSLSINDX><SLSINDX>1321</SLSINDX><MKDNINDX>1321</MKDNINDX><INUSINDX>1321</INUSINDX><INSRINDX>1321</INSRINDX><DMGDINDX>1321</DMGDINDX><CURNCYID>Z-US$</CURNCYID><UOFM>EACH</UOFM></taSopLineIvcInsert></taSopLineIvcInsert_Items><taSopLineIvcInsertComponent_Items xsi:nil="true" /><taSopTrackingNum_Items><taSopTrackingNum><SOPTYPE>3</SOPTYPE><SOPNUMBE>INV00000000000079</SOPNUMBE><Tracking_Number>1Z4905X30151927437</Tracking_Number></taSopTrackingNum></taSopTrackingNum_Items><taSopCommissions_Items xsi:nil="true" /><taSopLineIvcTaxInsert_Items xsi:nil="true" /><taCreateSopPaymentInsertRecord_Items xsi:nil="true" /><taSopUserDefined><SOPTYPE>3</SOPTYPE><SOPNUMBE>INV00000000000079</SOPNUMBE><USERDEF1>1Z4905X30151927437</USERDEF1><USERDEF2>Black Hole Plug/UC Davis - Hutchison Hall Room 172</USERDEF2><USRDEF03>L7345-1A1</USRDEF03></taSopUserDefined><taSopDistribution_Items xsi:nil="true" /><taAnalyticsDistribution_Items xsi:nil="true" /><taSopMultiBin_Items xsi:nil="true" /><taSopHdrIvcInsert><SOPTYPE>3</SOPTYPE><DOCID>INV</DOCID><SOPNUMBE>INV00000000000079</SOPNUMBE><SHIPMTHD>UPSR</SHIPMTHD><LOCNCODE>PLANT</LOCNCODE><DOCDATE>11/08/2012</DOCDATE><CUSTNMBR>1744B</CUSTNMBR><CUSTNAME>ISEC-Dixon</CUSTNAME><CSTPONBR>127427-12</CSTPONBR><ShipToName>ISEC CF# 1277427</ShipToName><ADDRESS1>1855 N. First Street</ADDRESS1><ADDRESS2>Suite D</ADDRESS2><CNTCPRSN>Todd Clapham</CNTCPRSN><FAXNUMBR>707-693-6570</FAXNUMBR><CITY>Dixon</CITY><STATE>CA</STATE><ZIPCODE>95620</ZIPCODE><COUNTRY>United States</COUNTRY><PHNUMBR1>707-693-6555</PHNUMBR1><USER2ENT>Status.NET</USER2ENT><BACHNUMB>RickTest22</BACHNUMB><PRBTADCD>BILLING</PRBTADCD><PYMTRMID>NET 30 Days</PYMTRMID><REFRENCE>1Z4905X30151927437</REFRENCE><DEFTAXSCHDS>1</DEFTAXSCHDS><CURNCYID>Z-US$</CURNCYID><COMMNTID>INVOICE</COMMNTID><DEFPRICING>1</DEFPRICING></taSopHdrIvcInsert><taSopToPopLink xsi:nil="true" /><taSopUpdateCreateProcessHold xsi:nil="true" /><taCreateSOPTrackingInfo xsi:nil="true" /><taMdaUpdate_Items xsi:nil="true" /></SOPTransactionType></eConnect>

eConnectTraceSource Information: 0 : 11/08/2012 13:22

Entering Method ExecuteSqlCommands.
Xml Node Name: taSopLineIvcInsert - 11/8/2012 1:22 PM
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

eConnectTraceSource Information: 0 : 11/08/2012 13:22

Entering Method ExtractStoredProcedureParameters.
Xml Node Name: taSopLineIvcInsert - 11/8/2012 1:22 PM
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

eConnectTraceSource Information: 0 : 11/08/2012 13:22

Leaving Method ExtractStoredProcedureParameters.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans