Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Multiple Searches
I am tring to do some code for item pricing. The code itself is not that important. One thing I have come accross multiple times and can't find an answer to, is when I run more than one search in code. For example:
var recType = 'invoice';
var histCol = [];
histCol[0]= new nlobjSearchColumn('entity');
histCol[1]= new nlobjSearchColumn('item');
histCol[2]= new nlobjSearchColumn('amount');
histCol[3]= new nlobjSearchColumn('rate');
histCol[4]= new nlobjSearchColumn('recordtype');
histCol[5]= new nlobjSearchColumn('trandate');
var histFilter = [];
histFilter[0]= new nlobjSearchFilter('entity', null, 'is', custid);
histFilter[1]= new nlobjSearchFilter('item', null, 'is', itemId);
histFilter[2]= new nlobjSearchFilter('recordtype', null, 'is', recType);
var histSearch = nlapiSearchRecord('transaction', null, histFilter, histCol);