Eric Schultz
03/06/2025, 9:34 PMCeligo AI
03/06/2025, 9:35 PMAI generated answer (using internal Slack threads):In N/Query, you can limit the number of results returned by using the
runPaged
method and setting the pageSize
parameter to 10. This will return the first 10 results of your query. Here is an example:
javascript
var myQuery = N/query.create({
// your query details here
});
var pagedData = myQuery.runPaged({ pageSize : 10 });
var firstPage = pagedData.fetch({ index : 0 });
var firstTenResults = firstPage.data;
In this example, firstTenResults
will contain the first 10 results of your query. If you want to get the next 10 results, you can fetch the next page by incrementing the index:
javascript
var secondPage = pagedData.fetch({ index : 1 });
var nextTenResults = secondPage.data;
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/06/2025, 9:35 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.817910969
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815737844
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.812941253
Celigo AI
03/06/2025, 9:35 PM