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.

Error After Restore SQL Backup of NAV 2013 Database

Hi all, we are facing a conman issue during restoring a SQL Database backup restored for NAV 2013. While Trying to run object from Object Designer we get below listed error (even the service is configured properly) - --------------------------- Microsoft Dynamics NAV Development Environment --------------------------- There are no NAV Server instances available for this database. You must ensure that a NAV Server instance is running and is configured to use the database before you perform this activity. --------------------------- OK    ---------------------------