Microsoft is introducing a new feature in Dynamics 365 Business Central 2024 Wave 1 release that allows users to enable or disable indexes via AL code. This feature is currently only available for on-premises scenarios. The new syntax for enabling or disabling indexes is "Database.AlterKey(KeyToDisable, Enable)". The "AlterKey" method allows for disabling and re-enabling of non-unique non-clustered indices in the context of the current transaction. Along with this feature, a new Table Key module is introduced, which provides functionalities for disabling and re-enabling table indexes easily. Disabling keys before bulk table write operations can significantly improve performance. This feature is only available for on-premises scenarios.
Login now to access my digest by 365.Training