I am running into an issue where trying to `findSu...
# suitescript
a
I am running into an issue where trying to
findSublistLineWithValue
fails to find a journal line on a Customer Payment (-1) when there are more than 10k lines on the
apply
sublist. When I change the Sort Order in the UI (literally no change to the code), in reverse order (showing the Journals at the top)
findSublistLineWithValue
works perfectly.
d
10k is the max number of search results (i think) so it may have something to do with that. You may have to just run a saved search and paginate it, then run through the results until you find the value
a
i ran into this a couple years ago and never found a solution via script. the end solution was to have the client apply/close old transactions more often - there aren't a ton of use cases where there actually should be 10k+ possible transactions to apply something to. let me know if you found anything script-wise though, i'd be curious!
a
@Daniel Patton not sure how this would help in a SS since I don’t need to find the transaction (I have the internal id of the Journal that was created in the script, the problem is applying a custom Journal to the Payment, and when the sublist sort is ascending, with only the Invoices showing first the Journal falls to far down the list
@amy yeah, seems like a pretty hard limitation, may cause a big problem for the Client. Their customers will regularly exceed 10k Invoices in the system, so I will come back and update if I find something!
a
looked back at my code and it looks like i did have a 2nd attempt where if "findsublistlinewithvalue" returned -1 (but i know it should be there), i then looped through all the lines - i think it still won't help if the one you want to find is beyond the first 10k, but if it is in that first 10k that could work (although take a lot longer obviously). not sure if that would help in your scenario but thought i'd mention it.