Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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>";