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.
search problem
Hi
I am trying to search the item master for a particular item id("LB-1").
My search returns all of the item master records. Any help will be appreciated.
Code is :
var filter = [];
var itemno = "LB-1";
filter[0] = nlobjSearchFilter("itemid", null, "is", itemno );
var searchresults = nlapiSearchRecord( "inventoryitem", null ,filter[0], null );
var record = nlapiLoadRecord(searchresults[0].getRecordType(), searchresults[0].getId() );
Debug shows the length of searchresult of 400. It should be 1 if the search worked properly. The record loaded is not the itemid of "LB-1" but another valid record.
0