diff --git a/application/Espo/Core/SelectManagers/Base.php b/application/Espo/Core/SelectManagers/Base.php index ce541e93fa..9a79380211 100644 --- a/application/Espo/Core/SelectManagers/Base.php +++ b/application/Espo/Core/SelectManagers/Base.php @@ -203,6 +203,8 @@ class Base } if ( + $sortBy != 'id' + && $this->getMetadata()->get(['entityDefs', $this->getEntityType(), 'fields', $sortBy, 'orderById']) && $this->getSeed()->hasAttribute('id')