Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
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>";