Details
-
Type:
Patch
-
Status: Done/Fixed
-
Priority:
Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.3.2
-
Fix Version/s: 3.4.alpha
-
Component/s: CiviCRM API
-
Labels:None
Description
Tested & fixed version of Lobo's patch from here http://paste2.org/p/1180464 allows instances of multi-record custom fields to be set through API
http://forum.civicrm.org/index.php/topic,17273.0.html
e.g
require_once 'api/v2/Contact.php';
$params = array ( 'contact_id' => 23,
'custom_23_1' = "first field in set',
'custom_23_2' = "second field in set',)
$result = civicrm_contact_add($params);
Note that the _1 & _2 represent records 2 & 3 in the custom data table that holds custom field 23
Also note that just passing 'custom_23' = "latest' will add a record to the multi-record field