diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.php index af2ecb5402..cb2e895f27 100644 --- a/application/Espo/Tools/Notification/RecordService.php +++ b/application/Espo/Tools/Notification/RecordService.php @@ -121,7 +121,11 @@ class RecordService $ids = []; $actionIds = []; - foreach ($collection as $entity) { + foreach ($collection as $i => $entity) { + if ($i === $limit) { + break; + } + $ids[] = $entity->getId(); $groupedCount = null;