Fix for CRM-15544
authorRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 4 Nov 2014 07:38:56 +0000 (13:08 +0530)
committerRohan Katkar <rohan.katkar@webaccessglobal.com>
Tue, 4 Nov 2014 07:38:56 +0000 (13:08 +0530)
CRM/Contact/Form/CustomData.php

index f2f49e53605b872d318b5c4ab58c10e012e9713d..1a5f9893a86263e77b0f10a29402ac01a2eece37 100644 (file)
@@ -127,7 +127,11 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form {
       // NOTE : group id is not stored in session from within CRM_Custom_Form_CustomData::preProcess func
       // this is due to some condition inside it which restricts it from saving in session
       // so doing this for multi record edit action
-      CRM_Custom_Form_CustomData::preProcess($this);
+      $entityId = CRM_Utils_Request::retrieve('entityID', 'Positive', $this);
+      if(!empty($entityId)) {
+        $subType = CRM_Contact_BAO_Contact::getContactSubType($entityId, ',');
+      }
+      CRM_Custom_Form_CustomData::preProcess($this, NULL, $subType, NULL, NULL, $entityId);
       if ($this->_multiRecordDisplay) {
         $this->_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $this);
         $this->_tableID = $this->_entityId;