Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
itemid column not returning full itemid (Item Name/Number) in nlapiSearchRecord()
I've got a programatic search I'm trying to run using the following as the basis for the code:
columns = new Array(); columns[0] = new nlobjSearchColumn('itemid'); columns[1] = new nlobjSearchColumn('internalid'); columns[2] = new nlobjSearchColumn('urlcomponent'); columns[3] = new nlobjSearchColumn('categorypreferred'); columns[4] = new nlobjSearchColumn('storedisplayname'); columns[5] = new nlobjSearchColumn('displayname'); columns[6] = new nlobjSearchColumn('parent'); columns[7] = new nlobjSearchColumn('matrix'); columns[0].setSort(); filters = [ ["type","anyof","InvtPart"], "AND", ["isonline","is","T"], "AND", ["isinactive","is","F"], "AND", ["website","anyof","2"] ] results = nlapiSearchRecord('inventoryitem', null, filters, columns);I need to be able to sort by itemid because I need to group the items together by matrix items. But, the results that are returned in the itemid column via nlapiSearchRecord are not the same ones I get when I just execute the search in Netsuite. When I run the search in Netsuite, I can see an itemid like this:
0