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

API: 'create' - Phone creates duplicate records

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.3.0
    • Fix Version/s: None
    • Component/s: CiviCRM API
    • Labels:
      None
    • Documentation Required?:
      Developer Doc

      Description

      Due to the deprecation of the 'update' function in the API, there doesn't appear to be a straightforward way of updating Phone records.

      e.g if I do civicrm_api('Phone','create',$params) $params = array('version' => 3, 'contact_id' =>1, 'phone' ....) etc with the same phone_type_id it creates an additional, duplicate phone number.

      This quirk isn't documented anywhere I can see. I assume I can use a get request to get the phone object with unique ID and update that way but its a bit inconvenient and should at least be documented somewhere. Do let me know if my understanding is wrong.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              paulc paul campbell
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: