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.
Required custom field for CashSale
I am trying to submit a CashSale through the SuiteTalk PHP Toolkit. A required field for the custom form I am using is End User (custbody_end_user) which points to a Customer record type. Here is part of the code I am using:
[PHP]
$cs=new CashSale();
$enduserField = new SelectCustomFieldRef();
$enduserField->value = new ListOrRecordRef();
$enduserField->value->typeId = '-2';
$enduserField->value->internalId = 46422;
$enduserField->internalId = 'custbody_end_user';
$cs->customFieldList = new CustomFieldList();
$cs->customFieldList->customField = array($enduserField);
[/PHP]
Which returns the following error:
[PHP]
[statusDetail] => Array
(
[0] => StatusDetail Object
(
[code] => USER_ERROR
[PHP]
$cs=new CashSale();
$enduserField = new SelectCustomFieldRef();
$enduserField->value = new ListOrRecordRef();
$enduserField->value->typeId = '-2';
$enduserField->value->internalId = 46422;
$enduserField->internalId = 'custbody_end_user';
$cs->customFieldList = new CustomFieldList();
$cs->customFieldList->customField = array($enduserField);
[/PHP]
Which returns the following error:
[PHP]
[statusDetail] => Array
(
[0] => StatusDetail Object
(
[code] => USER_ERROR
0