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

Unable to populate custom fields using the API

    Details

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

      Description

      I created a custom fields group and some custom fields for contact type=Organization, but attempting to create new contacts using the API yields an "Invalid custom field ID" error.

      In api/utils.php ~line 298:

      $customFields = CRM_Core_BAO_CustomField::getFields();

      should be:

      $customFields = CRM_Core_BAO_CustomField::getFields($values['contact_type']);

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              Anonymous
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: