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.
InternalID cannot be converted
Hi,
Need help, I'm trying to get the internalID of records from a saved search using PHP.
But this error appear.
Object of class RecordRef could not be converted to string
Below is my code.
include_once 'NetSuiteService.php';
$service = new NetSuiteService();
$search = new TransactionSearchAdvanced();
$search->savedSearchId = "586"; //Search internal ID
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
//print_r($searchResponse);
var_dump($searchResponse);
$rec = count($searchResponse->searchResult->totalRecords);
$record = $searchResponse->searchResult->searchRowList->searchRow;
echo "<br>";
if($rec > 0){
foreach ($record as $records) {
echo "InternaldID:" . $records->basic->internalId[0]->searchValue ."<br>";