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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Please note that on Friday, March 20, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 4 hours. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Search departments in a basic search (PHPToolkit)
[PHP] $ds = new nsComplexObject('DepartmentSearch');
$ds->setFields(
array(
'name' => $dept_names[0],
)
);
$search->setFields(
array(
'isOnline' => array( // whether or not it shows on the site
'operator' => 'is',
'searchValue' => 'true',
),
'department' => array(
'operator' => 'anyOf',
'searchValue' => $ds,
),
)
);[/PHP]
NetSuite server sends back 'INVALID_KEY_OR_REF' 'The specified key is invalid'. I would prefer to search and filter this way rather than filter the given results (which would include all departments). Also has a PHP error (I think because __soapCall() expects 'searchValue' to be a string?): recoverable fatal error: Object of class nsComplexObject could not be converted to string in ./PHP_Toolkit/PHPtoolkit.php on line 1637.
$ds->setFields(
array(
'name' => $dept_names[0],
)
);
$search->setFields(
array(
'isOnline' => array( // whether or not it shows on the site
'operator' => 'is',
'searchValue' => 'true',
),
'department' => array(
'operator' => 'anyOf',
'searchValue' => $ds,
),
)
);[/PHP]
NetSuite server sends back 'INVALID_KEY_OR_REF' 'The specified key is invalid'. I would prefer to search and filter this way rather than filter the given results (which would include all departments). Also has a PHP error (I think because __soapCall() expects 'searchValue' to be a string?): recoverable fatal error: Object of class nsComplexObject could not be converted to string in ./PHP_Toolkit/PHPtoolkit.php on line 1637.
0