Saturday, June 8, 2019

Suitelet > Add Mark all Button for a sublist

In order to incorporate the functionality to Mark All Buttons you can make use of addMarkAllButtons() method when calling an api that returns the nlobjSubList. Please refer to SuiteAnswers ID : 10276.

Below is the sample code you can refer to  :

function checkboxsuitelet(request, response)

{

var form = nlapiCreateForm('Invoice Page');

form.setScript('customscriptxx');

form.addButton('custpage_submit','Submit', "invoicelist();"); // add submit button which would in turn call a function named invoicelist in customscriptxxx 

var sublist = form.addSubList('custpage_mysublist','list','Invoice list');
    sublist.addMarkAllButtons();
    sublist.addRefreshButton(); // can make use of this method to perform refresh of list

// use sublist.addField to add fields to the sublist

 response.writePage(form);

}

No comments:

Post a Comment