Nour Khaled
04/17/2025, 10:42 AMCeligo AI
04/17/2025, 10:43 AMAI generated answer (using internal Slack threads):To show saved search results on multiple pages using a Suitelet in NetSuite, with every 100 results on a page, you can create a Suitelet using the
serverWidget.createList(options)
method and use URL parameters to filter the search results. You can then use these search results to create a list view.
Alternatively, you can use a Suitelet with a sublist view to show the search results and add pagination.
Here is a sample code snippet that was shared in the conversations:
javascript
//listens fieldChanged
function handlePageChange(rec, context) {
var currPage = Number(rec.getValue(context.fieldId));
var multiplier =100;
var minRow = (currPage - 1) * multiplier;
var maxRow = (currPage * multiplier) - 1;
var lineCount = rec.getLineCount('custpage_sublistid');
for (var i = 0; i < lineCount; i++) {
(i >= minRow && i <= maxRow)
? updateRowDisplay(i, '')
: updateRowDisplay(i, 'none');
}
}
//listens handlePageChange
function updateRowDisplay(line, displayType) {
jQuery('#custpage_sublistidrow' + line).css('display', displayType);
}
This code listens for a field change, calculates the current page, and then updates the row display accordingly.
Remember, if you want to retain the user selection when the page changes, you'd need to hold selected values in a hidden field to ensure you do not lose anything and update that field whenever something is selected/deselected. Also, when you move to a new list of rows, populate the tick box based on those values held in your hidden field.
******
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
04/17/2025, 10:43 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835502803
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.830914617
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.829740942
Celigo AI
04/17/2025, 10:43 AM