Friday, February 22, 2019

PHP Toolkit 2012.2 > getSelectValue Sample Code

This provides a sample code to make a getSelectValue request using PHPToolkit 2012.2.  The article requires a basic understanding of PHP and Web Services to get this working.

The following example attempts to get all available shipping method of a Sales Order:


     require_once './PHPToolkit/NetSuiteService.php';


     $service = new NetSuiteService($pref);
     $service->setPreferences(false, false, false, true);

     $fieldDescription = new GetSelectValueFieldDescription();
     $fieldDescription->recordType = RecordType::salesOrder;
     $fieldDescription->field = "shipmethod";

     $request = new getSelectValueRequest();
     $request->fieldDescription = $fieldDescription;
     $request->pageIndex = 0;

     $getResponse = $service->getSelectValue($request);


No comments:

Post a Comment