0

In NetSuite, is there any way to sort the line items on an invoice that is about to be initialized from a sales order?

I was trying to do this via web services, but it seems I am stuck to the order that they were in on the sales order.

I tried setting the "itemList.item[x].line" property for each line item and I have tried sorting the "itemList.item" array, but nothing changes.

I understand I can't do this on an existing invoice, but I'm surprised I can't do it on a brand new invoice.

user3075978
  • 775
  • 1
  • 8
  • 30
  • 1
    Did you check this ? http://stackoverflow.com/questions/31931779/netsuite-sorting-line-items/31965006#31965006 – Rockstar Feb 09 '16 at 06:17
  • Yes. You suggest that you can sort, but you shouldn't if there are records tied to any of the line items (e.g. fulfillments). I want to sort line items on a brand new invoice created from a sales order, but it doesn't seem possible. – user3075978 Feb 09 '16 at 16:46
  • Netsuite maintains order entries for each line item. If you create a saved search (columns : `line sequence number` & `line unique key`) on the SO you can see multiple results (without setting main line `true'). You already might have observed while creating an invoice for the SO from the UI it'll automatically source the item order. If you have a specific requirement to sort the line item entries you can do it prior in the SO itself, which is the best feasible way without any side impact. – Rockstar Feb 10 '16 at 04:58
  • Thanks. That's what we settled on. We will manage the line item order in the sales order. – user3075978 Feb 11 '16 at 00:51

1 Answers1

1

If you wanted to do this, I would edit the existing sales order and place the items in the "correct" order that you want.

Then go to convert the SalesOrder to an Invoice. The order of line items on the Invoice will match that of the SalesOrder.

Lez Yeoh
  • 340
  • 1
  • 2
  • 13