Skip to main content

How Sync-NAVApp saved the discrepancies in the field in Business Central Extension Vs. Base App

Introduction:

While Business Central upgrades from Version 14 to Version 15, there are few deprecation and additions done by Microsoft to the Base Application.
These deprecation are good in terms of getting better systems as it upgrades.
The drawbacks of Deprecation is that your App needs to be upgraded as well as it use BaseApp as reference.
Additionally, additions done are good but when you Extension App clashes with Upgraded Base App.
Let us discuss.

Pre-requisites:

  • Microsoft Dynamics Business Central
  • Understanding of Business Central PowerShell Module.

Books & References:

Demonstration:
While I was creating Extension App, I had added a field in Table Extension of BaseApp Tables when Business Central was on Version 13.

Everything was fine until Microsoft decided to add field with the same name in Version 15.

This means that my Extension App upgraded flawlessly from Business Central Version 13  to Business Central Version 14 without any human intervention but I'm stuck while upgrading to version 15.

Now, I couldn't Obsolete the field which was conflicting in my extension giving error as below.
Obsolete Field
I was able to Delete the field and Force-Sync my changes to Sandbox as well as a On- Premise Environment but this was not the case with Online Production.
Error while deploying of project after field is deleted

This hasle could simply avoided if I had a Prefix or  Suffix added to my field name 
For example : OR_PhoneNo.

My only mistake was that I was trying to replicate what Microsoft followed trying to give my Extension App a level of sophistication.

I think what we need to add Prefix property in Extension Manifest just as Dynamics 365 Sales has in its Solutions which applies to Object Names, Field Names, Page Field etc

Secondly, the Table Objects are created in Business Central through Extension App are stored in Database as a table with name CompanyName_ObjectName_NAVAppId and details of all the objects that are present in Extension App is stored in table NAVApp

Extension Tables in SQL Database

Business Central Extension Data stored in Database
You can also resolve this using Sync-NAVApp PowerShell command.
Syntax: Sync-NAVApp -Name <ProjeectName> -Tenant <TenantName> -Mode ForceSync -Force

Microsoft Product Group used Sync-NAVApp PowerShell Script on Business Central Production App Service.

On further discussion, I noticed that Microsoft is planning to make these infrastructure features as a part of Admin Center. Good News right? :)

Lastly, special thanks to all the support team and PG Team in helping me have a quick resolution and they have been the most supportive in brainstorming ideas with me.

Conclusion:

The only reason I wrote to this blog is to save your time figuring out this issue with Microsoft Support.
Although this was the first time such an issue was raised to Microsoft and they took it on their utmost priority.

Comments

Laurene said…
Hello Olister,

I have the exact same problem on my extension for the 15 to 16 upgrade with another field. If I understood correctly, the Sync-NAVApp command is not available in SaaS mode because we do not have access to the SQL database and therefore we can only solve this problem by contacting Microsoft support directly. Is that correct ?
Yes that is correct. I had managed to get this done from Microsoft Support as well.

Popular posts from this blog

Understanding and How to use APIs Business Central - 2

Introduction:
In my last blog post (Business Central API -1 ) on Creating API in Business Central, we discussed all the commonly used properties of the page, query, and controls like field and data-item. In today's blog, we will be diving deeply into the validation of the data passed through the API endpoint, how it enters into the source tables and is manipulated to be inserted/modified into single or multiple tables.
Also, I will be demonstrating how APIs are to be used.

Pre-requisites:
Microsoft Dynamics Business Central (SaaS)VS Code(https://code.visualstudio.com/download)AL Language Extension(https://tinyurl.com/yyvzxwkb)API V1 from Business Central On-Premise DVD
Books & References:
API V1 from Business Central On-Premise DVDAPI(V1.0) for Business Central (Click Here)API(Beta) for Business Central (Click Here)
Theory:
Understanding API in Business Central 1. BINDSUBSCRIPTIONS: Use to trigger IntegrationEvent for the Codeunit stated in parameters whenever the function calling BI…

Creating APIs in Business Central - 1

Introduction:
While writing a blog on Automated Testing in Business Central, I was going through sample apps provided by Microsoft and realized that the complexity is nowhere close to what examples Microsoft has provided on docs.microsoft.com. In this blog, I will try to explain how APIs work and how to be creative with the implementation. Also, an API which were in beta are finally out with version V1.0 in the April 2019 release let's see some important key things from development aspects.
This blog is going to be theoretical one kindly bear with me.


Pre-requisites:
Microsoft Dynamics Business Central (SaaS)VS Code(https://code.visualstudio.com/download)AL Language Extension(https://tinyurl.com/yyvzxwkb)API V1 from Business Central On-Premise DVD
Books & References:
API V1 from Business Central On-Premise DVDAPI(V1.0) for Business Central (Click Here)API(Beta) for Business Central (Click Here)
Solution:

Key Requirements:
API source table must have an Id(GUID) field per record for m…

Enum Object in Business Central - How to create and how to extend!

Introduction:
Since the dawn of Business Central Era (2nd April 2018 - Today), there are many new data types introduced by Microsoft.
One such data type is Enum(Enumeration). Essentially, what enumeration is having a single select value with multiple options at a given time!
Well, I know what your thinking what about the 'Option' data type.
Anyways, enough of talking let's just dive in!

Disclaimer:The knowledge in this blog is true and complete to the best of authors and publishers knowledge. The author and publisher disclaim any liability in connection with the use of this information.
Pre-requisites:
Microsoft Dynamics Business Central (SaaS or On-Premise)
VS code with AL Language extension

Code:
1. Enum as an Object:
Just like Tables and Pages, Enum behaves like an Object.
Note that Extensible means that the Enum Object can be extended in another module. By default, this property is set to TRUE.



Enums and Enum Extensions behave differently. They follow a different number se…