FD_Developer Posted April 24, 2022 Share Posted April 24, 2022 Hi , I am using oInvoicePost.Update() to create new invoice, I would like to get the newly created invoice number like shown below. is there any way to get that? // Update the Invoice if (oInvoicePost.Update()) { // var Xyz = oInvoicePost.Items["INVOICE_NUMBER"]; returnValue ="Successfully created Sage Invoice"; } Link to comment Share on other sites More sharing options...
McHarg, Alisdair Posted April 25, 2022 Share Posted April 25, 2022 Hi, Thanks for the question. It is possible to read the INVOICE_NUMBER field at the point of update using the following code : if (oInvoicePost.Update()) { // Line below shows that the Invoice number can be read post update int i = SDOHelper.Read(oInvoicePost.Header, "INVOICE_NUMBER"); MessageBox.Show("Invoice number " + i + " created successfully"); } Regards Alisdair 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now