Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
How to get custom fields from a Customer record
I have a rather simple PHP script which can perform a search and obtain a customer record. The search criteria is a custom field, which works OK.
There are other custom fields on the Customer record. They are visible when I var_dump() the results, so I know NetSuite is returning the data. But when I try to get the fields in the PHP script, no results are returned.
Example:
[PHP]// The following 3 lines work OK and set values.
$this->customer = $this->customerSearchRes->recordList[0];
$this->customerInternalID = $this->customer->getField('internalId');
$this->customerActive = !($this->customer->getField('isInactive'));
There are other custom fields on the Customer record. They are visible when I var_dump() the results, so I know NetSuite is returning the data. But when I try to get the fields in the PHP script, no results are returned.
Example:
[PHP]// The following 3 lines work OK and set values.
$this->customer = $this->customerSearchRes->recordList[0];
$this->customerInternalID = $this->customer->getField('internalId');
$this->customerActive = !($this->customer->getField('isInactive'));
0