Wednesday, May 15, 2019

Web Services PHP Toolkit saved search

It is possible to run NetSuite saved search using PHP Toolkit.


  1. Search internal ID - can be seen when search is executed as part of URL; parameter "searchid"
  2. Record type - can be seen on list of all searches (Lists > Search > Saved Searches)
Getting correct class name for searching:
  1. Create the class name string using pattern: "<recordType>SearchAdvanced". Example: VendorSearchAdvanced.
  2. Confirm the class name searching for string produced in the above step in PHP Toolkit library "NetSuiteService.php". For some classes the name is slightly different. For example "case" search class is "SupportCaseSearchAdvanced"
require_once '../PHPToolkit/NetSuiteService.php';$service = new NetSuiteService();$search = new SupportCaseSearchAdvanced();$search->savedSearchId = "121827"; //Search internal ID$request = new SearchRequest();$request->searchRecord = $search;$searchResponse = $service->search($request);
Note: This is applicable only for PHP Toolkit 2012.2 and higher.

No comments:

Post a Comment