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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. 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