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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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