here is the code I am using to create the line: so...
# suitescript
p
here is the code I am using to create the line: soid.insertLine({ sublistId: 'item', line: x+1 }); soid.setSublistValue({ sublistId: 'item', fieldId: 'item', line: x+1, value: 27035 });
s
I would not recommend using
soid
as the name of the variable that is the record object. It's confusing for someone else down the line. Change to
rec
or
soRec
, something like that.
s
'off by 1' may be a good motivator for using NFT where the code looks more like
so.item[x].item = 27035
or maybe even
const newline = so.item.addLine(); newline.item = 27035
p
what is NFT?