Our client want to integrate GP 2010 with their desktop application to post Invoice into GP using eConnect. We have build an eConnect WCF service to configure the GP Server and eConnect on the server and include the DLLs in "Client" application(application is using that WCF Service) and things just work. We are using 'SaveTranscationEntity' method of eConnect in Client app, we pass an eConnect XML document to create a Microsoft Dynamics GP sales order. The content of the XML document should have prompt eConnect to query Microsoft Dynamics GP for the next sales order number like it does in SOPTransaction. But in case of RMTransaction it didn't.
The XML from the document is as follows:
<!-- RM Transaction with Sales/Invoice and taxes -->
<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">
<RMTransactionType>
<taRMTransactionTaxInsert_Items>
<taRMTransactionTaxInsert>
<CUSTNMBR>ASSOCIAT0001</CUSTNMBR>
<DOCNUMBR>SALES000000000462</DOCNUMBR>
<RMDTYPAL>1</RMDTYPAL>
<BACHNUMB>SAVE</BACHNUMB>
<TAXDTLID>USASTE-PS6N0</TAXDTLID>
<TAXAMNT>24.00</TAXAMNT>
<STAXAMNT>0.00</STAXAMNT>
<FRTTXAMT>0.00</FRTTXAMT>
<MSCTXAMT>0.00</MSCTXAMT>
<TAXDTSLS>400.00</TAXDTSLS>
<ACTINDX></ACTINDX>
<ACTNUMST></ACTNUMST>
</taRMTransactionTaxInsert>
</taRMTransactionTaxInsert_Items>
<taRMTransaction>
<RMDTYPAL>1</RMDTYPAL>
<DOCNUMBR>SALES000000000462</DOCNUMBR>
<DOCDATE>2016-10-16</DOCDATE>
<BACHNUMB>SAVE</BACHNUMB>
<CUSTNMBR>ASSOCIAT0001</CUSTNMBR>
<DOCAMNT>424.00</DOCAMNT>
<SLSAMNT>400.00</SLSAMNT>
<DOCDESCR></DOCDESCR>
<CUSTNAME></CUSTNAME>
<ADRSCODE></ADRSCODE>
<SLPRSNID></SLPRSNID>
<SALSTERR></SALSTERR>
<SHIPMTHD></SHIPMTHD>
<TAXSCHID></TAXSCHID>
<CSTPONBR></CSTPONBR>
<COSTAMNT></COSTAMNT>
<TRDISAMT></TRDISAMT>
<FRTAMNT></FRTAMNT>
<MISCAMNT></MISCAMNT>
<TAXAMNT>24.00</TAXAMNT>
<BKTSLSAM></BKTSLSAM>
<BKTFRTAM></BKTFRTAM>
<BKTMSCAM></BKTMSCAM>
<LSTUSRED></LSTUSRED>
</taRMTransaction>
</RMTransactionType>
</eConnect>
Now the problem is every time we want to post this Invoice, we first have to assign a new 'DOCNUMBR'. If we make this XML field empty, so that eConnect can assign the next sales order number automatically, then error shows up:
Error:Object reference not set to an instance of an object.
And if the provided 'DOCNUMBR' is already exist then this error shows up:
Error:Sql procedure error codes returned:Error Number = 7148 Stored Procedure= taRMTransactionTaxInsert Error Description = Duplicate Tax Node ID in the RM10601 table
Node Identifier Parameters: taRMTransactionTaxInsert
CUSTNMBR = ASSOCIAT0001
DOCNUMBR = SALES000000000463
RMDTYPAL = 1
TAXDTLID = USASTE-PS6N0
BACHNUMB = SAVE
Any thoughts on this, How we can overcome this issue?
Thanks in advance.
*This post is locked for comments