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
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