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

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing - 

Microsoft Dynamics NAV 2016 - How to Configure Phone Client.

Hi All, In this article we will discuss how we can connect Microsoft Dynamics NAV 2016 with New Client Launched i.e. Phone Client. This Article Contain Steps for a Android Phone as I have Only Android Phone. I am doing it having all tiers on my windows 8 machine, steps remain same for multiple servers but issues might be different. What we Need (Other what we discuss in this article) -  The Service Tier should be on Public IP . Some of the Data-card does not Provide you Public IP. check it for sure.

Download Microsoft Dynamics Business Central on Premises 2020 Wave 2 Release.

 Hi Readers, As Expected Microsoft have released #msdyn365bc 2020 wave 2 is available.  This article provides details of the new release. The 2020 release wave 2 for Business Central delivers a wealth of new features. Read What's new in 2020 Release Wave 2 here .  Dynamics NAV Customers upgrading to Business Central on Prem will be able to run business central on premises, move to cloud or choose a hybrid approach.