Hello team, I have a client script that selects re...
# suitescript
a
Hello team, I have a client script that selects records from a sublist to match a total amount from a body field. So, I use a loop on the sublist with getSublistValue, get the sublist line amount, and if it is less than the accumulated total, I select the record. This works okay, but my question is related to the “sorting” of the sublist. Since the user is able to sort the sublist based on different columns, I would like to loop thru the sublist in the current order shown, not based on the line id. Any ideas on how to accomplish this?
Hehe, I asked ChatGPT about this and he gave this answer. That is what I am looking for, if it existed only 🙂
😆 1
message has been deleted
// loop through the ‘item’ sublist in screen order rec.eachSublistLine
d
hahaha, Let me know if you do ever find the answer though, I'm curious
👍 1
a
Thanks, but no answer yet…
must be a way to do it