(Sales Orders) how do I iterate through an item su...
# suitescript
k
(Sales Orders) how do I iterate through an item sublist reliably when sometimes there are line IDs/line sequence numbers greater than getLineCount? (not talking about the difference between 1-indexed lineId and 0-indexed sublist lines, but when I get a line count of 9 but there's an item with a line ID of 12)
Now that I think of it, I could perform a search that gets all of the items and their line IDs, then specifically iterate through that set of values - but is there a more direct way?
b
you dont use line ids to iterate
you use line ids to match to the line
if the line count is 9, there are 9 lines
with one of them having an id of 12
the implication here being that the id does not indicate the line count
k
gotcha, that makes sense, getSublistValue etc is not determined by the line ID, if I want to check the line ID I need to pull that value when I iterate through the lines using e.g., the 0-8 indices Thank you sir!