Friday, September 21, 2018

Dynamically get the Customer Category using SuiteScript

How to dynamically get all available Customer Category in an account without manually going to Setup > Accounting > Accounting Lists > Customer Category.

Sample Code Snippet:

var columns = new Array();
columns[0] = new nlobjSearchColumn('name', null, null);
var search = nlapiSearchRecord('customercategory',null,null,columns);
for(var i in search)
{
var internalId = search[i].getId();
var description = search[i].getValue('name')
}  

No comments:

Post a Comment