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.
ItemID Search Broken?
I have a script that searches for an item based on the Name/Number (we use 5 digit #s). Today I noticed the script no longer works correctly. I am using the 2011.2 API. My code is as follows:
------
q = new nScomplexObject("SearchStringField");
$q->setFields(array("searchValue" => $item,
"operator" => "is"));
$search = new nsComplexObject("ItemSearchBasic");
$search->setFields(array("itemId" => $q));
$myNSclient->setSearchPreferences(false, 10);
print_r($search);
$searchResponse = $myNSclient->search($search);
print_r($searchResponse);
------
I coded a version using the 2012.2 API and it returns similar results.
------
$service = new NetSuiteService();
$service->setSearchPreferences(false, 20);
$itemId = new SearchStringField();