Thursday, March 7, 2019

Web Service > PHPToolkit 2012.2 – PHPToolkit 2013.1 > getAsyncResult Code Samples

Web Service > PHPToolkit 2012.2 – PHPToolkit 2013.1 > getAsyncResult Code Samples

Note: This article applies to the PHP Toolkit 2012.2 and PHPToolkit 2013.1.

 

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests.

The example below shows the way to getAsyncResult.

 

 

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


The alternate way for PHP Toolkit 2012.1 and below is:

<!--php require_once '../PHPtoolkit_2012_1.php'; require_once 'login_info.php'; global $myNSclient; $jobId = ASYNCWEBSERVICES_TSTDRV948111_050120131645071552114723467_b8; $result = $myNSclient--->getAsyncResult($jobId, 1); ?>

No comments:

Post a Comment