From bd1fa7062cef9b1ae5f97aec33f739a4e7322630 Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 14 Apr 2017 11:47:59 +0530 Subject: [PATCH] CRM-20429 - Deleting an activity with target contacts > 50 results in error --- CRM/Activity/Form/Activity.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Activity/Form/Activity.php b/CRM/Activity/Form/Activity.php index c08a2814c9..d0b6dad586 100644 --- a/CRM/Activity/Form/Activity.php +++ b/CRM/Activity/Form/Activity.php @@ -567,7 +567,7 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task { } // 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')); -- 2.25.1