2

We have invoice documents in GP 10.0. Recently, the accounting department has decided that when the incorrect client has been billed, we will return the invoice and create a new one. (Previously, we would issue a credit memo to the wrong client and a debit memo to the new client).

I have been pointed at taSopHdrIvcInsert, but I'm not sure what to do with it or how to save it back. Because I'm never 100% sure what fields GP really needs, I was hoping I could use eConnect or web services to get the document by number, change the SOPTYPE to 4-Return and save it back since it appears everything else should be the same.

I can then invoice the new client and save that into GP using existing processes.

Thanks.

Pete
  • 3,991
  • 3
  • 31
  • 30

1 Answers1

1

I got an answer over on the Dynamics GP Forums. The Web Service did have a method for me to use that was called CreateSalesReturn. I used the Web Service to pull back the invoice, and then I populated a SalesReturn object from the invoice's data and used CreateSalesReturn to get it into GP.

Pete
  • 3,991
  • 3
  • 31
  • 30
  • Can you include the solution you received from the Dynamics GP Forums? – Scorpion May 18 '16 at 20:30
  • 1
    That was the solution I received. I populated a SalesReturn object with the invoice data, and called CreateSalesReturn() on Dynamics GP Web Services. That solved the problem. Previously, I had been trying to modify and save back a SalesDocument of type invoice as type return. That was incorrect, I needed to call CreateSalesReturn() – Pete May 20 '16 at 20:58