Let's not confuse "line number" with "line index". I just took this new (to me, at least) method for a walk and it failed OR I'm really missing how it's to be used. Consider this code:
var order = nlapiLoadRecord('salesorder', 224784); var index = order.findLineItemValue('item', 'line', 1); The value of index is -1. The order I'm loading has 3 lines on the item list and although it's POSSIBLE to have lines numbers like 4,5,6 it's not the case with my test because I just created the order and haven't removed any lines, thus not creating a gap.Oh, and I tried 'linenumber' as well but it never returns anything but null.Consider this examples:[LIST=1][*]Create sales order with two lines and save - they have line numbers 1 and 2, top down[*]Insert a new line inbetween them - it now has INDEX 2, but line number 3 (it's the "third line added")[/LIST]Given that scenario it's my assumption that this code:order.findLineItemValue('item', 'line', 3);would return a value (i.e. 1-based index) of 2.Agree? Disagree? Bug?