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

Using civicrm_contact_create() setting greeting is not consistent with address

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2.3
    • Fix Version/s: 3.2.4
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      email_greeting_display and postal_greeting_display do not follow the expected usage of address_display. Setting those values when calling civicrm_contact_create() does not update the greetings. Instead, you have to use email_greeting_custom and postal_greeting_custom.

      The following does not return an error or set the address display correctly in the web interface.

      $params = array('contact_type' => 'Organization', 'organization_name' => 'Happy Corp', email_greeting_display => 'Dear Ruthless Corporation');
      $contact =& civicrm_contact_create($params);
      if ($contact->is_error == 1)

      { print_r($contact); }

      Instead, use _custom even though addressee_display does not work this way.

      $params = array('contact_type' => 'Organization', 'organization_name' => 'Happy Corp', email_greeting_custom => 'Dear Ruthless Corporation');
      $contact =& civicrm_contact_create($params);
      if ($contact->is_error == 1) { print_r($contact); }

      Hard to say if this is a bug in the web interface or a simple inconsistency in the API.

        Attachments

          Activity

            People

            • Assignee:
              priya Priya Prajapati
              Reporter:
              dharmatech Dharmatech
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: