When looping through the standard lines on a gl pl...
# general
s
When looping through the standard lines on a gl plugin, is there a way to reference a line on the transaction? There is a transaction column I need to get that will drive the account it is refunded to
s
Yes, you can access the item lines using:
var fieldValue = record.getLineItemValue('item', fieldId, lineNumber);
Just remember that in SuiteScript 1.0 the first line number on a sublist is 1 (I forget that since I rarely use 1.0 anymore, except in plug-ins.
s
How do you get the line number from the standard lines?
s
I do this to iterate over the item list. I don’t know if there is a way to relate standard GL lines to item lines, however if there is a unique itemId or other field that is unique on the line level, you can look for it as you loop through the list.