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
Please note that on Friday, March 20, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 4 hours. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Sending custom fields in sales order
I have been able to run through the php toolkit with little to no problems, though some of the documentation is lacking you can normally figure it out with trial and error. I seem to be stuck on trying to send custom fields though, keep getting close but still haven't found the correct syntax to send the custom fields. Here's my code:
[CODE]$customObject = new nsComplexObject("SelectCustomFieldRef");
$customObject->setFields(array('internalId' => 'custbody_new_die_yn','value' => 'NO'));
$salesOrderFields = array(
'entity' => new nsRecordRef(array('internalId' => $userId)),
'paymentMethod' => array('internalId' => 8),
'ccNumber' => 4111111111111111,
'ccExpireDate' => date("c", mktime(0,0,0,11,1,2011)),
[CODE]$customObject = new nsComplexObject("SelectCustomFieldRef");
$customObject->setFields(array('internalId' => 'custbody_new_die_yn','value' => 'NO'));
$salesOrderFields = array(
'entity' => new nsRecordRef(array('internalId' => $userId)),
'paymentMethod' => array('internalId' => 8),
'ccNumber' => 4111111111111111,
'ccExpireDate' => date("c", mktime(0,0,0,11,1,2011)),
0