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.
How do I return Custom Fields when executing a stored Saved search...
I have a Transaction Search in NetSuite which has a custom body field. The field is a List which returns a list of customers. Sales Orders effectively have 2 Customers related to them.
The following throws an exception when trying to retrieve the custbody_end_customer value. The value is however returned in the logged XML.
[PHP]
require_once 'PHPToolkit/NetSuiteService.php';
$service = new NetSuiteService();
$search = new TransactionSearchAdvanced();
$search->savedSearchId = "766";
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
if (!$searchResponse->searchResult->status->isSuccess) {
echo "SEARCH ERROR";
} else {
echo "SEARCH SUCCESS, records found: " . $searchResponse->searchResult->totalRecords . "\n";
The following throws an exception when trying to retrieve the custbody_end_customer value. The value is however returned in the logged XML.
[PHP]
require_once 'PHPToolkit/NetSuiteService.php';
$service = new NetSuiteService();
$search = new TransactionSearchAdvanced();
$search->savedSearchId = "766";
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
if (!$searchResponse->searchResult->status->isSuccess) {
echo "SEARCH ERROR";
} else {
echo "SEARCH SUCCESS, records found: " . $searchResponse->searchResult->totalRecords . "\n";
0