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.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. 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