RE: How to get saved search by using PHP Toolkit or SOAP API?

Hi,

I am getting saved search using PHP Toolkit by its internal id but I get this error.

RE: How to get saved search by using PHP Toolkit or SOAP API?

Please, assist me in getting saved searches by internal id. The saved search I am getting is public and the role also has access to the saved searches.

yasir Beginner Asked on April 14, 2023 in How To's.
Add Comment
1 Answers

Could you please share the code that is making the request?

Thanks,

Chris

Advanced Answered on April 14, 2023.

Hi Chris, I am facing same problem and here is my code:

require_once 'lib/NetSuiteService.php';$service = new NetSuiteService(); $searchId = '1340';$searchType = 'customer';  $searchRequest = new SearchRequest();$search = new CustomerSearchAdvanced();$search->savedSearchId = $searchId; $searchRequest->searchRecord = $search; request$searchResponse = $service->search($searchRequest); if (!$searchResponse->searchResult->status->isSuccess){echo"SEARCH ERROR";echo'<pre>';print_r($searchResponse->searchResult);echo'</pre>';}else{echo"SEARCH SUCCESS, records found: ".$searchResponse->searchResult->totalRecords."\n";$records=$searchResponse->searchResult->searchRowList->searchRow;foreach ($recordsas$record) {echo"Name: ".$record->basic->name->searchValue."\n";}}
Here is screenshot of the code as well because code block seems messy despite all efforts:

codeCode screenshot

on July 24, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.