tiger
03/26/2025, 8:55 AMCeligo AI
03/26/2025, 8:56 AMAI generated answer (using internal Slack threads):To write a SuiteScript to find records and limit the results to 10 records, you can use the
runPagedpageSizeN/searchjavascript
var mySearch = search.create({
   type: "customrecord_my_custom_record",
   filters: [
      // your filters here
   ],
   columns: [
      // your columns here
   ]
});
var myPagedData = mySearch.runPaged({pageSize: 10});
myPagedData.pageRanges.forEach(function(pageRange) {
   var myPage = myPagedData.fetch({index: pageRange.index});
   myPage.data.forEach(function(result) {
      // process each result here
   });
});"customrecord_my_custom_record"filterscolumnsrunPagedPagedDataPagePagepageSizeCeligo AI
03/26/2025, 8:56 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.826294839
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.814903498
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813207388
Celigo AI
03/26/2025, 8:56 AM