cancel
Showing results for 
Search instead for 
Did you mean: 

Create Sales Order With Di-Server returning the OrderNum

Former Member
0 Kudos

Hello,

I m creating a Sales Order with SabBobsCom in C# and ASP.NET.

Everything works fine, however i would like to display the auto generated OrderNumber so the customer can reference to this number. I hoped the value in DocNum was available, but that is not the case.

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

former_member201110
Active Contributor
0 Kudos

Hi Johan,

You can use the GetNewObjectCode method of the company object to retrieve the DocEntry value of the order you've just created. You can then use this to retrieve the DocNum value.

More information on the GetNewObjectCode is the SDK Help Center.

Kind Regards,

Owen

Answers (1)

Answers (1)

Former Member
0 Kudos

I should be available after you add the Sales Order, remember when creating a new sales order you don't have the final number until you have added that sales order to the database.