Skip to main content

#msdyn365bc - Add keys to Base Tables?

Hi Readers,

I hope everyone would have heard about new feature  

Partners can add keys (indexes) to base tables and table extension tables with Business Central 2021 Wave 1.

Till now We were able to add keys in Table extension which have fields from the same table extension.

In this article, we will understand what changed with Business Central 2021 Wave 1.

#msdyn365bc
Index tuning is an important tool for partners to deal with performance issues.

With changes in Business Central 2021 Wave 1, we (developers) are allowed to add fields in key from base Microsoft table.

Example - Added a Key in Customer Table Using Table Extension. (as shown below)

Key Added - Blocked.


Don't get too excited reading that, lets understand what is possible and not. 

When you add a key using table extension (#msdyn365bc V18 and higher) you can create key with - 
  • All key fields from base tables.
  • All key fields from table extension.
But you cannot add a key with combination of fields from base table and table extension. This will be an compilation issue as shown below.



Error Message - The property can only be set if the specified fields are from the same table.

Why Error ? -
  • When we add a table extension, a new sql table is created in sql server. 
  • A Key created in Business Central will be added as index in sql table.
  • In this scenario customer (base MS Table) and Customer Extension (Extension table) are two different tables in SQL. 
I think its logical but I am sure that is what we (developers) expected from this feature.


Hope you like the article.

Let me know your views as comment to article.

Regards,
Saurav Dhyani
www.sauravdhyani.com

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

NAV 2013 R2 - Cumulative update 12 Released.

Hi all, Please find below the details of  Cumulative Update 12 released for Microsoft Dynamics NAV 2013 R2. Title - Cumulative Update 12 for Microsoft Dynamics NAV 2013 R2 Build No. - 38053 Release Date - October, 2014 Local Version Included - AU, AT, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, SE, UK, RU Download Link Note: Implementing this cumulative update will require a database conversion unless you have already implemented update rollup 5.

NAV 2013 Upgrade Part III - Data Upgrading.

Hi all, As per agenda we need to discuss the data upgrade in NAV 2013. The process is similar to what used to be till NAV 2009 R2 but with some changes. Let's start the process. Remember -  1) You can only upgrade a database to NAV 2013 from NAV 2009 SP1 / R2 SQL Only. 2) The Synchronization of users with SQL Server is no more required.