Using GetSelectValue in Netsuite PHP Toolkit


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);
Advertisements

I am a web developer working @ Gaditek

Posted in Netsuite, Programming & Development
2 comments on “Using GetSelectValue in Netsuite PHP Toolkit
  1. Anonymous says:

    Thanks for that tip. But i still can’t get it working for a custom record. An example of that would be really appreciated. Thanks

  2. Anonymous says:

    Thks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: