as it looks like there’s no way to specify that yo...
# suitescript
c
as it looks like there’s no way to specify that you want to add a NEW line when you’re in standard mode
s
This is how I do it
Copy code
const so = new SalesOrder()
      const newline = so.item.addLine()
      newline.item = 4
      newline.quantity = 1
      so.save()
r
For standard mode, you need to know the count of the lines and increment that by 1 to add a new line. So if the current line count is 5, you use
Copy code
objRecord.setSublistValue({
    sublistId: 'item',
    fieldId: 'item',
    line: 5,
    value: '1234'
});
s
using
insertLine()
at the end works as well, (that's what my code same does behind the scenes)