CRM-20429 - Deleting an activity with target contacts > 50 results in error
authoryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 14 Apr 2017 06:17:59 +0000 (11:47 +0530)
committeryashodha <yashodha.chaku@webaccessglobal.com>
Fri, 14 Apr 2017 06:17:59 +0000 (11:47 +0530)
CRM/Activity/Form/Activity.php

index c08a2814c9208a06b6a1bde9af438764a9dd9840..d0b6dad586a68ee646e7877f25f092ed264e5ac3 100644 (file)
@@ -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'));