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.
Need help with Purchase Orders (PHP)
I'm currently trying to view the Purchase Orders but can't seem to get by some basic errors that don't make any real sense.
$itemSearch = new nsComplexObject("PurchaseOrder");
$itemSearch->setFields(array("createdDate" => array( "operator" => "after", "searchValue" => "2009-06-26T00:00:00-05:00")));
$myNSclient->setSearchPreferences(false);
$searchResponse = $myNSclient->search($itemSearch);
No matter what I do I keep on getting errors like this:
Fatal error: Uncaught exception 'Exception' with message 'ComplexType reference was not found in directory. ComplexTypeName = dateTime' in /var/www/html/PHP_Toolkit/PHPtoolkit.php:1736 Stack trace: #0 /var/www/html/PHP_Toolkit/PHPtoolkit.php(25): getNameSpace('dateTime') #1 /var/www/html/PHP_Toolkit/PHPtoolkit.php(63): nsComplexObject->__construct('dateTime') #2 /var/www/html/test.php(15): nsComplexObject->setFields(Array) #3 /var/www/html/test.php(52): getPO() #4 {main} thrown in /var/www/html/PHP_Toolkit/PHPtoolkit.php on line 1736