Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.1
-
Fix Version/s: 3.4.2
-
Component/s: CiviCRM API
-
Labels:None
Description
Under v3 of the API, custom_field_get does not actually return a custom field, rather an array of all custom fields.
May I propose that this be amended, so that custom_field_get returns a single custom_field, and custom_fields_get returns the list (current behaviour).
I am currently relying on the below as a workaround.
function civicrm_api3_custom_field_retrieve($params)
{
try
catch (PEAR_Exception $e)
{ return civicrm_api3_create_error( $e->getMessage() ); } catch (Exception $e) { return civicrm_api3_create_error( $e->getMessage() ); }}
Similarly, there is no _get function for CustomGroup. Is this deliberate?