Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
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();