$service = new NetSuiteService();
$so[0] = new SalesOrder();$so[0]->internalId = 3021;
$so[0]->memo = "First Order";
$so[1] = new SalesOrder();
$so[1]->internalId = 2921;
$so[1]->memo = "Second Order";
$updateListRequest = new UpdateListRequest();
$updateListRequest->record = $so;
$updateListResponse = $service->updateList($updateListRequest);
for($i=0; $i<count($updateListResponse->writeResponseList->writeResponse); $i++){
if (!$updateListResponse->writeResponseList->writeResponse[$i]->status->isSuccess) {
echo "UPDATE LIST ERROR";
} else {
echo "UPDATE LIST SUCCESS ID" . $updateListResponse->writeResponseList->writeResponse[$i]->baseRef->internalId."\n";
}
}
No comments:
Post a Comment