I have created a SuiteQL query which show the sale...
# ask-stanley-ai
k
I have created a SuiteQL query which show the sales order of last 15 days, then I used in portlet (simple form) to show it on a dashboard. the problem is it show more than 100 SO on dashboard is there a way to customize the portlet so that it will show SO in pagination like 10 record per page?
c
AI generated answer (using internal Slack threads):
****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ****** Unfortunately, the standard NetSuite portlets do not support pagination. However, you can achieve this by creating a custom Suitelet portlet. In this Suitelet, you can create a list with pagination and display the results of your SuiteQL query. You can control the number of records displayed per page in a Suitelet. Here is a basic example of how you can create a list with pagination in a Suitelet:
Copy code
javascript
var list = serverWidget.createList({
    title: 'Sales Order List'
});

list.addColumn({
    id: 'salesorder',
    type: serverWidget.FieldType.TEXT,
    label: 'Sales Order'
});

// Add your SuiteQL query results here
var results = []; // Replace this with your SuiteQL query results

var sublist = list.addSublist({
    id: 'salesordersublist',
    type: serverWidget.SublistType.LIST,
    label: 'Sales Orders'
});

sublist.addField({
    id: 'salesorder',
    type: serverWidget.FieldType.TEXT,
    label: 'Sales Order'
});

for (var i = 0; i < results.length; i++) {
    sublist.setSublistValue({
        id: 'salesorder',
        line: i,
        value: results[i]
    });
}

context.response.writePage(list);
Please replace the
results
array with your SuiteQL query results. This will create a list of sales orders with pagination. You can then add this Suitelet to your dashboard as a custom portlet. Remember, this is a basic example and you might need to adjust it according to your needs.
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.838017583
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.835899949
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831856906
Please provide your feedback on this answer.