Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.2.3
-
Fix Version/s: 3.2.6
-
Component/s: CiviCRM API
-
Labels:None
Description
The current contact API only allows data to be added for custom data that are active. In some cases (mine for example with data synchronization) it can be necessary to be able to add custom data through the API that is not active to the user.
The function civicrm_check_custom_parms calls a BAO function:
$customFields = CRM_Core_BAO_CustomField::getFields( $params['contact_type'], false, false, $csType, null, $onlyParent );
The second parameter $showAll controls if all or only active fields are used, the solution is to include that parameter in the API function.