Hi everyone, i'm new to N/query. Does anyone know ...
# suitescript
h
Hi everyone, i'm new to N/query. Does anyone know how to get around the limit of 5,000 results. TIA
Copy code
var mySQLQuery = myQuery.toSuiteQL();
var resultSet = mySQLQuery.run();
var results = resultSet.results;
n
https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_1510780277.html#Query.runPaged() the runPaged() method lets you get pages of results that would exceed the normal limit of query.run()
☝️ 1
h
Thank you, i'll give it a shot
r
There is also an option to do your own pagination by getting row count and querying based on lower and upper limit. You can check out the suiteQL tool by tim. It has the logic in it, I find it more satisfying, don't remember why I stopped using runPaged().
thanks 1