Dedule rule form : get contact type name instead of label
authorSunil Pawar <sunil@cividesk.com>
Thu, 14 Dec 2017 08:10:04 +0000 (13:40 +0530)
committerSunil Pawar <sunil@cividesk.com>
Thu, 14 Dec 2017 08:10:04 +0000 (13:40 +0530)
CRM/Contact/Form/DedupeRules.php

index 3491cfb79f7f7aecc8d75575da59e7a86f0e2835..9f032958bfe31a75d02d2525ca722f8fd17f95b7 100644 (file)
@@ -58,7 +58,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form {
     }
     $this->_options = CRM_Core_SelectValues::getDedupeRuleTypes();
     $this->_rgid = CRM_Utils_Request::retrieve('id', 'Positive', $this, FALSE, 0);
-    $contactTypes = civicrm_api3('Contact', 'getOptions', array('field' => "contact_type"));
+    $contactTypes = civicrm_api3('Contact', 'getOptions', array('field' => "contact_type", 'context' => "validate"));
     $contactType = CRM_Utils_Request::retrieve('contact_type', 'String', $this, FALSE, 0);
     if (CRM_Utils_Array::value($contactType, $contactTypes['values'])) {
       $this->_contactType = CRM_Utils_Array::value($contactType, $contactTypes['values']);