CRM-16990: Custom fields are NOT being saved for some component custom data (activiti...
authoryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 23 Oct 2015 10:10:13 +0000 (15:40 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 23 Oct 2015 10:10:13 +0000 (15:40 +0530)
----------------------------------------
* CRM-16990: Custom fields are NOT being saved for some component custom data (activities, membership ...)
  https://issues.civicrm.org/jira/browse/CRM-16990

CRM/Contact/Form/Relationship.php

index 0d7c1f6f4a95db5e132d049c7dda28b506b875b5..83214662886b548edad28a3a8e4b251b994f82de 100644 (file)
@@ -200,6 +200,11 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
       }
     }
 
+    // retrieve relation type id from post variables
+    if (!$this->_relationshipTypeId) {
+      $rType = explode('_', CRM_Utils_Array::value('relationship_type_id', $_POST));
+      $this->_relationshipTypeId = $rType[0];
+    }
     // when custom data is included in this page
     if (!empty($_POST['hidden_custom'])) {
       CRM_Custom_Form_CustomData::preProcess($this, NULL, $this->_relationshipTypeId, 1, 'Relationship', $this->_relationshipId);