
Before I get started, thank you to anyone who cares to read this long post. Any thoughts or comments at all are appreciated.
Background
----------
I have inherited this project and did not write any of the original code so hopefully that helps explain how little I understand about eConnect. The little I have learned comes from porting the code to GP 2010. Initially we were using GP 9.0 and eConnect 8. Our sofware manages sales orders, shipping, scheduling etc. and the client uses GP to run it's accounting. We create a sales order in GP for each sales order in our system and attempt to update information on the GP sales order when something in our system changes. The original developer assumed everything was working fine and it seemed to be in eConnect 8 with GP 9. When I attempted to do the equivalent with eConnect 2010 (eConnect 11 I believe) I found that the same functionality no longer worked and when I started looking at the past numbers it appears they were not always correct either. When attempting to update a sales order in GP 2010 with eConnect 2010 I get the erros below (Erros 1). I have tried every suggested combination to make this work but it does not and several posts with similar problems suggest that updating sales orders with manual taxes in eConnect is not supported and never has been. It looks like eConnect 2010 has more robust error checking. eConnect 8 with GP 9 has never reported an issue and would happily update the sales order, line items and taxes. I found that the taxes would usually be incorrect.
Solution
--------
As a solution to the above problem I decided to delete the sales order and recreate it with the same order number. eConnect 2010 allows this and I thought everything was good. I can't find any documentation that says this is a bad thing to do and they get the same functionality as before. Unfortunately, a few weeks after release I got a call telling me there was an issue with sales orders that have a deposit on them. I looked into it and the following happens. When I attempt to delete the sales order eConnect will delete all of the line items and then it realizes there is a deposit entered on the sales order. (It's entered by going to "Amount Received" from the "Sales Order Entry" screen) It reports the errors below in Error 2 and sometimes leaves a blank sales order (it would be nice if it rolled back rather than making a complete mess of the order). Based on that error and some reading it appears that I have to set RemovePayments to 1 which will also delete the payments/deposits and insert a reversing entry. This seemed like a reasonable solution so I decided to read the sales order before deleting it to get the deposit/payment information and then add it back to the newly created order using taCreateSopPaymentInsertRecord.
Using taCreateSopPaymentInsertRecord
------------------------------------
When looking at taCreateSopPaymentInsertRecord it appears that you cannot set the accounts. The "Cash Account" is defaulted when you send the "Card Name" for a credit card deposit and the "Deposits" account is defaulted to none. I have looked everywhere to do this through eConnect and it just doesn't seem possible. I don't understand why, I can do it through the user interface and I can query the values through eConnect yet I can't set them. I have posted this problem in another post and someone was kind enough to suggest adding a distribution. The distibution is accepted without a parsing error but it does nothing to the deposit so unless I am not passing enough information it is not a solution.
Possible Solution
-----------------
I have written a stored procedure that update the account on the deposit and in the GL but I'm scared to change things in the database directly because I have no idea what the consequences will be or what I may miss.
Questions
---------
1) Is deleting and re-creating a sales order a really bad thing to do? If so what is a proper solution to the first problem?
2) Am I missing something about payments/deposits and accounts with eConnect? It seems like the implementation is incomplete.
3) Am I in for more problems if I get the current ones solved?
4) Does everyone use eConnect or is there a better way to do all of this?
Errors 1
--------
Microsoft.Dynamics.GP.eConnect.eConnectException: Sql procedure error codes returned:
Error Number = 1785 Stored Procedure= taSopHdrRecalc Error Description = Unable to create distributions
Node Identifier Parameters: taSopHdrRecalc
SOPNUMBE = ORD15009
SOPTYPE = 2
Error Number = 2218 Stored Procedure= taSopHdrIvcInsert Error Description = Unable to update the existing SOP Header record
Node Identifier Parameters: taSopHdrIvcInsert
SOPNUMBE = ORD15009
SOPTYPE = 2
Error Number = 8329 Stored Procedure= taSopHdrRecalc Error Description = Tax table detail does not equal the tax amount - manual tax changes are not supported on Updates
Node Identifier Parameters: taSopHdrRecalc
SOPNUMBE = ORD15009
SOPTYPE = 2
<taSopHdrIvcInsert>
<SOPTYPE>2</SOPTYPE>
<DOCID>REGULAR</DOCID>
<SOPNUMBE>ORD15009</SOPNUMBE>
<ORIGNUMB />
<TAXSCHID>HST (13%)</TAXSCHID>
<FRTSCHID>HST (13%)</FRTSCHID>
<SHIPMTHD>TRUCK/COM CARRI</SHIPMTHD>
<TAXAMNT>5292.40</TAXAMNT>
<LOCNCODE>PLANT</LOCNCODE>
<DOCDATE>2011-08-24</DOCDATE>
<FREIGHT>596.10</FREIGHT>
<CUSTNMBR>XXXXXX</CUSTNMBR>
<CSTPONBR>345</CSTPONBR>
<ShipToName>GP2010 Testing</ShipToName>
<ADDRESS1>123 Generic Way</ADDRESS1>
<ADDRESS2 />
<ADDRESS3 />
<CNTCPRSN>Test Test</CNTCPRSN>
<FAXNUMBR>00000000000000</FAXNUMBR>
<CITY>London</CITY>
<STATE>ON</STATE>
<ZIPCODE>XXX XXX</ZIPCODE>
<COUNTRY>Canada</COUNTRY>
<PHNUMBR1>55555555550000</PHNUMBR1>
<PHNUMBR2>00000000000000</PHNUMBR2>
<PHNUMBR3>00000000000000</PHNUMBR3>
<SUBTOTAL>40710.81</SUBTOTAL>
<DOCAMNT>46676.80</DOCAMNT>
<PYMTRCVD>11000.00</PYMTRCVD>
<USER2ENT>XxxxxxXxxxxxx</USER2ENT>
<BACHNUMB>WEBORDERS</BACHNUMB>
<FRTTXAMT>77.49</FRTTXAMT>
<ORDRDATE>2011-08-24</ORDRDATE>
<CREATETAXES>0</CREATETAXES>
<DEFTAXSCHDS>0</DEFTAXSCHDS>
<CURNCYID>Z-C$</CURNCYID>
<ReqShipDate>2011-08-26</ReqShipDate>
<CKCreditLimit>0</CKCreditLimit>
<UpdateExisting>1</UpdateExisting>
<CMMTTEXT>Need Van</CMMTTEXT>
</taSopHdrIvcInsert>
at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateEntity(String connectionString, String xml)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessEntityImport(String connectionString, String sXML, Boolean isTransaction)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.UpdateTransactionEntity(String connectionString, String sXML)
at SofSurfaces.SofGP2010CCW.UpdateTransactionEntity(String connectionString, String requestXml, String& error)
Errors 2
--------
Microsoft.Dynamics.GP.eConnect.eConnectException: Sql procedure error codes returned:
Error Number = 2943 Stored Procedure= taSopDeleteDocument Error Description = Document contains posted deposits, it cannot be deleted unless the RemovePayments option is used
Node Identifier Parameters: taSopDeleteDocument
SOPNUMBE = ORD15009
SOPTYPE = 2
Related Error Code Parameters for Node : taSopDeleteDocument
RemovePayments = 0
<taSopDeleteDocument>
<SOPTYPE>2</SOPTYPE>
<SOPNUMBE>ORD15009</SOPNUMBE>
<RemovePayments>0</RemovePayments>
</taSopDeleteDocument>
at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateEntity(String connectionString, String xml)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessEntityImport(String connectionString, String sXML, Boolean isTransaction)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.DeleteTransactionEntity(String connectionString, String sXML)
at SofSurfaces.SofGP2010CCW.DeleteTransactionEntity(String connectionString, String requestXml, String& error)
*This post is locked for comments
I have the same question (0)UsedByAnr,
I read through your post earlier regarding the SOP Payment type and the inability to pass an account number to the taCreateSopPaymentInsertRecord eConnect node. I have also read through this posting three times and each time I am coming to the same conclusion. You need to get a support case opened so you can work with a Developer Support engineer on your integration issues.
I can tell you that the ability to pass a GL account to this node has not been there and is determined based on the payment type you are passing in. If you are truly passing in a Credit Card deposit, the cash account will be blank and the deposit account will be pulled from your setup.
Clearly understand you inherited this project from another party, going our on your own and manually updating tables as you think they need to be isn't worth the risk to yourself or your customer. In addition, with opening the support case, you will get a better feel for what is needed to integrate a SOP Document. It is the most complex integration eConnect has...so it isn't a bad thing if you can't figure out what needs to happen with everything.
Also...upgrading an eConnect solution either v8 or v9 to GP 2010 will have to be re-written (or at least some parts of it). Not sure why you would be deleting anything at this point. So...
1. Open a case to discuss with an engineer what you have currently and what you are trying to do. You shouldn't have to delete a sales order to make a change.
2. Not an incomplete implementation. Those accounts are pulled from setup. In addition, if you wanted to update those account to something else, you can also do that in a post procedure after the document has been integrated with success. Are you familiar with the pre and post procedures? If not, another good reason to open a support case.
3. More problems...maybe. Again...a good point to open a support case.
4. Another tool available to you is Integration Manager or GP Web services. But both still use eConnect as the base integration tool.
Bottom-line...please open a support case to work through your issues.
Thanks!
Aaron Donat
Sr. Escalation Engineer
Dynamics GP - Microsoft