Nowadays I am working on porting one of my Suite Talk projects to the newer version of Netsuite PHP Toolkit.
In my previous version I use the getSelectValue operation using following code.
$myNSClient->getSelectValue( new nsComplexObject( "GetSelectValueFieldDescription", array('recordType' => $record,'field' => $field) ) );
I converted the code accordingly but the new toolkit was returning this error
No such operation ‘getSelectValue’
After some debugging I found that pageIndex is now a Required Attribute, so I had to add the following line
$request->pageIndex = 0;
Here’s the complete working code
$obj = new GetSelectValueFieldDescription(); $obj->recordType = $recordType; $obj->field = $field; $request = new getSelectValueRequest(); $request->fieldDescription = $obj; $request->pageIndex = 0; $getResponse = $service->getSelectValue($request);