Hi,
What is the recommended way to set the ReferenceNumber when creating a new SalesOrder. Currently I'm doing this:
var invoiceList = sageCompany.Factories.SalesOrderFactory.List();
invoiceList.Load();
var top1 = invoiceList.OrderByDescending(x => x.ReferenceNumber).ToList();
invoiceNumberInt = Convert.ToInt32(top1[0].ReferenceNumber) + 1;
Which is kind of inefficient, as I'm loading the entire list of SalesOrders.
Is there a better way?
Thank,
Ignacio