0

I would like to copy a few lines of the sales order "item" sublist and insert them into another sales order.

For now I have just found N/record.insertLine(sublistId, lineNr, ignoreRecalc), but I can't see how this function could help me because it doesn't take any data.

My use case is that I have a sales order out of which I have to generate other sales orders, but only containing some of the items of the original sales order.

waka
  • 3,362
  • 9
  • 35
  • 54
Edda
  • 3
  • 2

1 Answers1

0

I think you need these two to work with.

Get Sublist
...
var objField = objRecord.getSublistField({
 sublistId: 'item',
 fieldId: 'item',
 line: 3
});    

Set Sublist

objRecord.setSublistValue({
     sublistId: 'item',
     fieldId: 'item',
     line: 3,
     value: true
    });
Anurag Kumar
  • 165
  • 1
  • 6
  • 17