if ($checkCheckBoxField && !empty($fields['custom_' . $customFieldID]) && $fields['custom_' . $customFieldID]['html_type'] == 'CheckBox') {
formatCheckBoxField($value, 'custom_' . $customFieldID, $entity);
}
- // update custom field using get api, temporary value has to Overwrite
- // get api return custom_customFieldID and custom_customFieldID_customValueID
- if ($customValueID) {
- $value = $params['custom_'.$customFieldID];
- }
+
CRM_Core_BAO_CustomField::formatCustomField($customFieldID, $values['custom'],
$value, $extends, $customValueID, $entityId, FALSE, FALSE, TRUE
);