How do I update a custom field with ConnectPHP?
Version February 2017 and newer, Connect Common object Model (CCOM) version 1.3 and newer
Custom fields are set when the save() method is called on any primary object.
$incident->Subject = "Subject updated";
$incident->CustomFields->c->text_field = "new value";
$incident->CustomFields->c->menu_field = new RNCPHP\NamedIDLabel() ;
$incident->CustomFields->c->menu_field->LookupName = 'value 1';
$incident->CustomFields->c->integer_field = 123;
Note: The NamedIDLabel object will only allow a value to be assigned once. Assigning more than once will result in an exception indicating "Not allowed: NamedID.ID already set". Overwriting an already assigned value will require a new instantiation of the NamedIDLabel object.
For additional information please visit: Answer ID 5169: Technical Documentation and Sample Code