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.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Specifying Custom Fields as a result column
Can anyone help me with building an advanced search request where I can specify a custom field as a result column?
here's what I have, but it fails....
[PHP]//login
$nsClient = new nsClient();
$nsClient->login( $username, $password, $account, $role );
//create objects
$itemSearchAdvanced = new nsComplexObject( "ItemSearchAdvanced" );
$itemSearch = new nsComplexObject( "ItemSearch" );
$itemSearchBasic = new nsComplexObject( "ItemSearchBasic" );
$itemSearchRow = new nsComplexObject( "ItemSearchRow" );
$itemSearchRowBasic = new nsComplexObject( "ItemSearchRowBasic" );
//add criteria
$searchField = new nsComplexObject( "SearchEnumMultiSelectField" );
$searchField->setFields( array("operator"=>"anyOf", "searchValue"=>array("_assembly")) );
$itemSearchBasic->setFields( array($name=>$searchField) );
$itemSearch->setFields( array("basic"=>$itemSearchBasic) );
//add displayName column
$columnField = new nsComplexObject( "SearchColumnStringField" );
here's what I have, but it fails....
[PHP]//login
$nsClient = new nsClient();
$nsClient->login( $username, $password, $account, $role );
//create objects
$itemSearchAdvanced = new nsComplexObject( "ItemSearchAdvanced" );
$itemSearch = new nsComplexObject( "ItemSearch" );
$itemSearchBasic = new nsComplexObject( "ItemSearchBasic" );
$itemSearchRow = new nsComplexObject( "ItemSearchRow" );
$itemSearchRowBasic = new nsComplexObject( "ItemSearchRowBasic" );
//add criteria
$searchField = new nsComplexObject( "SearchEnumMultiSelectField" );
$searchField->setFields( array("operator"=>"anyOf", "searchValue"=>array("_assembly")) );
$itemSearchBasic->setFields( array($name=>$searchField) );
$itemSearch->setFields( array("basic"=>$itemSearchBasic) );
//add displayName column
$columnField = new nsComplexObject( "SearchColumnStringField" );
0