Sunday, January 13, 2019

PHP Toolkit 2012.2 Sample Code: Initialize a Record

Below is a sample code on how to initialize a cash sale from the customer record.


<?php

require_once '../NSPHPClient/NetSuiteService.php';

$service = new NetSuiteService();
$internalId=13851;


$initializeObject = new InitializeRecord();
$initializeObject->type = "cashSale";
$initializeObject->reference = new InitializeRef();
$initializeObject->reference->type = "customer";
$initializeObject->reference->internalId = $internalId;


$request = new InitializeRequest();
$request->initializeRecord = $initializeObject;
$initializeResponse = $service->initialize($request);
var_dump($initializeResponse);



?>

 

No comments:

Post a Comment