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

Popular posts from this blog

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…

Generic way of Attaching Documents on any Record of the Page in Microsoft Dynamics Business Central - Template Code

Problem Statement: In Microsoft Business Central, there is a way to attach attachments only on Documents or Master Table records. But, what if this requirement is for other tables such as Opportunities, custom tables, etc. Introduction: I have seen many developers afraid to touch the attachment-related customization as it seems complicated.
Well, I have found a solution and here it goes.
In this blog, I'm attempting to create a generic template for code that needs to have an attachment feature on any table that you like using AL Code.
This means that you simply cannot copy-paste the same code for all the tables but a simple change in variable sub-type will ease your work significantly
Pre-requisites:Microsoft Dynamics Business CentralVS CodeAl Language ExtensionSource Code:https://github.com/olisterr/Generic-Attachment-Template Demonstration:1. How it works:
Document Attachment is a table which stores a few things that help in tracking information related to the attachment

The main u…