updateCustomField($fieldId, $fieldValues)
You can find the id of the field by going to Admin -> Settings -> Set up custom fields for -> Go and when you hover the field you are interested into you will see the id.
Getting the value is more tricky. What works on any type of field is setting a value manually and then querying DataFormField for the value like this:
$returnFields = array('DataType', 'Id', 'FormId', 'GroupId', 'Name', 'Label', 'DefaultValue', 'Values', 'ListRows');
$query = array('Id' => custom_field_id);
$res = $sdk->dsQuery("DataFormField", 10, 0, $query, $returnFields);
var_dump($res);
In the result above, have a look at the "Values" field, this is how it should look like.So to conclude, if you need to update a listbox custom field, this will do it:
$values = array(
'Values' => "\naaa\nbbb\nddd"
);
$result = $sdk->updateCustomField(custom_field_id, $values);
Thanks for sharing such beneficial information with us. Your article is really very enjoyable while reading and please keep sharing more.
ReplyDeleteKaseya | Infusionsoft
ReplyDeleteBoots Opticians
Halfords Give Us A Steer
Subaru Owner
We are a company that specializes in cleaning homes from the inside and outside, and we also have a home sterilization service. Click on شركة تعقيم دبي And also sterilize
ReplyDeletehomes in the city of Sharjah, too, press شركة تعقيم في الشارقة and شركة تعقيم في عجمان and شركة تعقيم في راس الخيمة With the best materials for comprehensive cleaning and sterilization from viruses harmful to humans .
شركة تعقيم منازل في عجمان
شركة تعقيم في الشارقة
شركة تعقيم دبي
شركة تعقيم في راس الخيمة
خطوات تنظيف المنزل
شركة تعقيم بالاحساء
ReplyDeleteوالتى لها دور كبير فى عمليات التطهير والتعقيم فى الكثير من الأماكن فى كافة أنحاء المملكة العربية السعودية وليست الإحساء فقط.