CRM-14904 retain subtype when saving org from contact dashboard form
authorBrian Shaughnessy <brian@lcdservices.biz>
Mon, 23 Jun 2014 17:38:00 +0000 (13:38 -0400)
committerBrian Shaughnessy <brian@lcdservices.biz>
Mon, 23 Jun 2014 17:38:00 +0000 (13:38 -0400)
CRM/Contact/Form/RelatedContact.php

index fc0617ab3fd13ee6b2edfc061c244711e8210c9f..4fba5517f83f5a4ac06e7a10e2b64099351a9504 100644 (file)
@@ -181,6 +181,10 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
     }
 
     $params['contact_type'] = $this->_contactType;
+    //CRM-14904
+    if ( isset($this->_defaults['contact_sub_type']) ) {
+      $params['contact_sub_type'] = $this->_defaults['contact_sub_type'];
+    }
     $params['contact_id'] = $this->_contactId;
 
     $contact = CRM_Contact_BAO_Contact::create($params, TRUE);