Friday, September 21, 2018

Dynamically Get the Vendor Category in SuiteScript

Dynamically get all available Vendor Category in an account without manually going to Setup > Accounting > Accounting ListsVendor Category.

Sample Code Snippet:

var search = nlapiSearchRecord('vendorcategory',null,null,null);
for(var i in search)
{
var internalId = search[i].getId();
var recType = search[i].getRecordType();
var description = nlapiLookupField(recType,internalId,'name');
}

 

No comments:

Post a Comment