if ($this->_action & CRM_Core_Action::VIEW) {
// Get the tree of custom fields.
- $this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', $this,
+ $this->_groupTree = CRM_Core_BAO_CustomGroup::getTree('Activity', NULL,
$this->_activityId, 0, $this->_activityTypeId
);
}
}
// CRM-15472 - 50 is around the practical limit of how many items a select2 entityRef can handle
- if (!empty($defaults['target_contact_id'])) {
+ if ($this->_action == 2 && !empty($defaults['target_contact_id'])) {
$count = count(is_array($defaults['target_contact_id']) ? $defaults['target_contact_id'] : explode(',', $defaults['target_contact_id']));
if ($count > 50) {
$this->freeze(array('target_contact_id'));