We have a script that loops through lines of a sales order and writes ASA values...
Which lines are adjusted is determined by a saved search with a very complicated formula comparing a calculated value to the actual ASA value written on the line.
The search only displays lines that require update, however, it appears that the line numbers are static---
If we start with a 3-line sales order (would have lines 1, 2 and 3)
Then we remove line 2 (for whatever reason)
Lines one and three would still remain as line 1 and line 3
However, when we loop through by script I can only reference lines by their order in the sublist, not by the netsuite lineID.
Is there some way in a saved search to find a particular line-item's POSITION in the items sublist?
I am thinking of perhaps an SQL field that could display the RANK of a particular line's position within all sublist line IDs. The catch with that would be that this is not a summary search and it is displaying only specific line items based on a VERY complicated calculation.
Any ideas???