Saturday, March 9, 2019

PHPToolkit > Fatal Error > No such operation 'getAsyncResult'

Fatal error: Uncaught SoapFault exception: [Server.userException] No such operation 'getAsyncResult'

If you get this error, it is usually caused by forgetting to add the pageIndex.

Example of producing this error:

<!--phprequire_once '../PHPToolkit_2012_2/NetSuiteService.php';$service = new NetSuiteService(); $asyncResultReq = new GetAsyncResultRequest();$asyncResultReq--->jobId = "ASYNCWEBSERVICES_TSTDRV948111_0619201115837013541082170298_c";//Hard coded the job ID retrieved from getAsyncSearch $results = $service->getAsyncResult($asyncResultReq);print_r($results);?>

To fix this problem add this before get result.

$results = $asyncResultReq->pageIndex = 1;

1 comment: