Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-531

crm_update_contact() does not update custom fields

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None

      Description

      I'm trying to update/create custom-field values for an existing contact ($CRM). I've tried updating the custom field, and
      $CRM2 = crm_update_contact($CRM,array('custom_12' => 'newvalue'));
      doesnt work. On the other hand,
      CRM_Core_BAO_CustomValue($CRM->id, 12, 'newvalue');
      does, but that's a bad way of doing things I guess.

      (in this example, 12 is the id of the custom field I'm interested in)

      I couldn't see examples of custom field values being set in the test suite, so it might be
      functionality that's still in the pipeline...

        Attachments

          Activity

            People

            • Assignee:
              kurund Kurund Jalmi
              Reporter:
              krabi Peter Cruickshank
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: