Discussions
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.
Saved Search
I'm currently attempting to retrieve the results from a saved search within Netsuite using the PHP toolkit 12.2. I've tried the below code but with no success. Any help would be more than welcome. Thanks!
require_once '../PHPToolkit/NetSuiteService.php';
$service = new NetSuiteService();
$search = new CustomRecordSearchAdvanced();
$search->savedSearchId = "customsearch125";
$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";
$records = $searchResponse->searchResult->searchRowList->searchRow;
foreach ($records as $record) {
echo "Name: " . $record->basic->name->searchValue . "\n";