NetSuite Development Notes
Friday, March 15, 2019
Execute getList in PHP Toolkit
This article provides a sample code to make a getList request using PHPToolkit 2012.2.
The following example attempts to get a Customer, Sales Order and a Custom Record:
require_once './PHPToolkit/NetSuiteService.php';$service = new NetSuiteService();$getListRequest = new GetListRequest();$getListRequest->baseRef = array();$getListRequest->baseRef[0] = new RecordRef();$getListRequest->baseRef[0]->internalId = '7';$getListRequest->baseRef[0]->type = RecordType::customer;$getListRequest->baseRef[1] = new RecordRef();$getListRequest->baseRef[1]->internalId = '77';$getListRequest->baseRef[1]->type = RecordType::salesOrder;$getListRequest->baseRef[2] = new CustomRecordRef();$getListRequest->baseRef[2]->internalId = '777';$getListRequest->baseRef[2]->typeId = '103'; // internal ID of the custom record$response = $service->getList($getListRequest);echo '<pre>';print_r($response);echo '</pre>';
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment