What’s the best way to get a saved search result t...
# suitescript
n
What’s the best way to get a saved search result that has more than 4000 rows. I tried runPaged({pageSize: 1000}), the loop through the pageRanges. But I noticed some rows will be duplicated, even though there’s no duplicated rows when running the search in the UI
a
This should not produce any duplicated lines unless you have something off in your search, meaning no proper filters or grouping not being handled correctly.
b
I had similar issues when running paged suiteQL queries through the REST API, and adding an explicit
order by
to insure a stable order resolved the issue for me.
r
Order By usually fixes such scenarios as mentioned above.
n
Yup, thank you! @raghav and @Bruce Backman . It worked perfectly after I added Order By