How to set custom field list using Suite talk PHP Toolkit in NetSuite
In this post we will see how to set customfield list in NetSuite using PHP Suitelet
$so = new SalesOrder();
$so->entity = new RecordRef();
$so->entity->internalId = 1694;
$so->itemList = new SalesOrderItemList();
$aSelectField = new SelectCustomFieldRef();
$aSelectField->value = new ListOrRecordRef();
$aSelectField->value->internalId = 1; // Internal Id of the list field value
$aSelectField->scriptId = 'custbody_order_type'; // Internal id of the select field
$customFieldList = new CustomFieldList();
$customFieldList->customField[] = $aSelectField;
$so->customFieldList =$customFieldList;
$soi = new SalesOrderItem();
$soi->item = new RecordRef();
$soi->item->internalId = 3673;
$soi->quantity = 3;
$soi->price = new RecordRef();
$soi->price->internalId = $id;
$soi->amount = 55.3;
$so->itemList->item = array($soi);
$request = new AddRequest();
$request->record = $so;
$addResponse = $service->add($request);
Hope this resolves your issue.