API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Querying for next order number


Does the API provide a method for querying the next available order number without having to create an order?

In the system we're building, we would like to display the possible next order number to the customer. This may of course be different, when the actual order is committed and we will show the actual assigned order number to the customer, when the order has been confirmed.


created Jan 29, 2010 by SoftInvent
0% Accept Rate
Q 1 A 0 C 0

1 Answer

Hi Henrik

I'm afraid that IOrder doesn't have a GetNextAvailableNumber like IDebtor.
So the way to get the next available number for IOrder is to GetAll(), and then select a MAX on IOrder.Id and add that with 1.

I hope this can help you.

Christian Wendel
E-conomic International A/S
answered Feb 1, 2010 by cwe
Visma e-conomic A/S