diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.php index 476847e24a..8608d21c55 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;