Goes this imply the script is going to cap results...
# suitescript
n
Goes this imply the script is going to cap results of the search at 1000?
m
Yes. That’s the most that can be returned in a single
getResults()
call. If you need to return more than 1000, you would need to implement a paging system and store all of the results yourself. See Suite Answers Article 33496 for an example.
❤️ 1
n
Thanks Mike! For context, we are a retailer, and this script is sourcing order status updates to the website for the customer. So it appears based on the current volume of business that this method is no longer sufficient in the event that we had > 1000 updates in a 30 minute period.
m
Take note that the
.each()
method mentioned in that SuiteAnswers article can process up to 4000 results (make sure to
return true
in the function) but won't actually process unlimited results as the article insinuates.
2
m
Valid point on the
each()
method, but to me that seems a bit like kicking the can down the road. If you business booms, you’ll need rethink again when you exceed the 4000 count. Might as well do it now.
s
NFT has this solved for years now, feel free to check out LazySearch to see if it fits your need.