diff --git a/application/Espo/Tools/Notification/RecordService.php b/application/Espo/Tools/Notification/RecordService.php index fc60368b42..bd6ae46fd1 100644 --- a/application/Espo/Tools/Notification/RecordService.php +++ b/application/Espo/Tools/Notification/RecordService.php @@ -897,7 +897,7 @@ class RecordService ]) ->where([Notification::ATTR_USER_ID => $user->getId()]) ->order([]) - ->order($this->getMaxNumberExpr(), Order::DESC); + ->order(Notification::ATTR_NUMBER, Order::DESC); if ($notRead) { $builder->where([Notification::ATTR_READ => false]);