Friday, July 12, 2019

PHP > 2012.2 Toolkit or later > Retrieve Partner record using PHP

Ability to retrieve partner record via PHP web services


require_once '../PHPToolkit/NetSuiteService.php';

$service = new NetSuiteService();

$request = new GetRequest();
$request->baseRef = new RecordRef();
$request->baseRef->internalId = "16405";
$request->baseRef->type = "partner";
$getResponse = $service->get($request);

if (!$getResponse->readResponse->status->isSuccess) {
    echo "GET ERROR";
} else {
    $partner = $getResponse->readResponse->record;
    echo "GET SUCCESS, partner:";
    echo "\nCompany name: ". $partner->companyName;
    echo "\nInternal Id: ". $partner->internalId;
    echo "\nEmail: ". $partner->email;
}



No comments:

Post a Comment