When developing extensions for Business Central you have a wide array of publishing options to choose from.
My most used options when working on the ForNAV Customizable Report Pack are our Sandbox and Docker.
Testing is best on the Sanxbox for two reasons. First because all the Azure Active Directory stuff actually returns something which is useful for licensing scenario’s. Second because you can easily share the result with the team since everyone is on the same Sandbox.
Docker is useful when you don’t want to test on current but on an older or vNext instance.
Lastly it’s also possible to install Business Central on your own infrastructure altough this is a dying species.
In your Visual Studio Code project you can specify how you want to publish in the launch.json file but did you also know you can setup miltiple configurations and then choose one at the time of publishing.
Big news, it seems that Microsoft is fixing the issues we’ve found in our App for AppSource. Both the functions on the TempBlob and the Language table will be added back!
But also, let’s continue where we left off with the previous episodes because there are more challenges that won’t be fixed. Let’s see if we can fix some reference problems.
Before we do that, please allow me to repeat that despite these breaking changes Business Central remains by far the best customizable ERP system in the cloud.
For this blog post I’m going to fix the errors in the ForNAV Modern Object Designer as Extention. Benefit is that you can do this yourself too. Just download it from http://www.fornav.com, convert it using the fornav converter against spring and than connect it to the Docker. (end of advertizing ForNAV)
Issue #1 – Renamed Codeunits
After connecting the extension to Fall we see that the codeunit NavExtensionInstallationMgt is missing.
However… this is not true, and very confusing.
Reason for this, is that Microsoft RENAMED a codeunit (they actually renamed a bunch). Now in the old days this was NOT DONE, even though in this case C/Side would have handled the rename for us because C/Side works at compile time with object ID’s. This is because C/Side was developed in the late ’80ies early ’90ies when memory was expensive.
Visual Studio Code works with object names. So how do we figure out the new name for this codeunit???
The obvious answer here would be to install the ForNAV Modern Object Explorer but hey, we are fixing this now right? So let’s go nerdy and hack into SQL and see what’s going on there.
In C/Side we can see that the Codeunit ID is 2500. But Fall does not ship C/Side.
Let’s see what we can find in the SQL Server database.
Accessing SQL on Docker
If you run Docker you can still access SQL via Management studio. An SA account is created with the same password as your NAV user. The SQL does not have an instance, so just connect to the IP address of the container.
The default name of the database is Financialsw1 which I think is funny and a remainder of our temporary product name. If you want you can also relate it back to Navision Financials.
First place to look would be the Object Table. So let’s run a query.
Select * from [Object]
No results, which makes sense because there is no more C/Side and all code is in an Extension.
SELECT [Object Name], * FROM [NAV App Object Metadata] where [Object ID] = 2500
So let’s see what we can find in the NAV App Object Metadata table
Here it is, and now it is called “Extension Installation Impl”. So let’s try that!
Issue #2 – Protection
So we’ve found the codeunit’s new name. Yeah! Let’s change it and see what happens.
One of the functions started working, but one did not, and the codeunit still does not compile.
The reason for this is the protection level of the codeunit, and a broken contract. But how do we investigate that?
If you try Go To Definition on the object, you still get a “D/AL” file with no code, and it seems like Microsoft is not shipping the AL code in the App file on the Docker Container for the System app. Also we don’t know yet if it is in the system app.
Back to SQL Server
select * from [NAV App] where [Package ID] = '6418C5AF-4672-43DA-AD73-FF140FBBD537'
From the previous query we know that the App the object belongs to has ID 6418C5AF-4672-43DA-AD73-FF140FBBD537.
If we query that app in the NAV App table we can see it is system.
Before we dive into the list of (breaking) changes that I’ve discovered so far, I will first explain how to check your extension against the preview of the fall release.
This is mostly interesting for those who are on AppSource or partners who have refactored their IP into On Prem extensions. I’m going to assume all of them have access to the Ready to Go program. If not, send me a message and I’ll help you onboard.
In another episode we’ll dive deeper into making your own Base App run on System.
So assuming you have a running service tier (on Docker or via de DVD on your machine) we need to make a few changes to the App.Json.
NOTE: You first need a new VSIX compiler. Download this from the Docker or DVD.
Plaform & Application
The Platform version needs to be changed to 15. The application needs to be removed. There is no more application.json file with symbols.
Now the dependencies need to be set. There are (most often) two apps needed here
Not really a “Marketing Friendly” name for the whole old Navision solution converted to AL code, but that’s it actually.
GUID = 437dbf0e-84ff-417a-965d-ed2bb9650972
Version = "220.127.116.11"
Essentially you’ll get the same information as in previous versions with the app.json file generated by the finsql.exe but the .app file contains source code. I’ll get back to that in next episodes.
No consistency here. You would expect it to be called SystemApp, or BaseApp to be called Base Application. 😉
This is not to be confused with the platform .app file you’ll still get too. This still contains the 2 billion system objects that just are magically there (I think still maintained by finsql.exe when generating the database)
The new System Application is actually what you can find here on GitHub. But this seems not to contain source code. Again, more in a next episode.
Some examples of application parts that are moved to System Application are
Tenant and Azure AD management
GUID = 63ca2fa4-4f03-4f2b-a480-172fef340d3f
Version = 18.104.22.168
Your app.json file will now look something like this
Delete Old Symbols
It’s always a good idea to remove old symbol files before moving on. The compiler always looks at the latest version but here it might get confused because of all the moving parts.
Download new Symbols
Now just get the new symbols and your window will look something like this and starts showing you the warnings and errors.
Please note this is the result after some cleaning up. I’m not finished. I’ll write more about TempBlob and other refactoring challenges later.
Be careful what you ask for, you might actually get it.
This phrase illustrates what we will see when Microsoft releases Business Central Wave II this October where C/Side is removed in favor of Visual Studio Code, The Windows Client discontinued in favor of the Web Interface and the old Navision application is broken into two parts and very heavy refactoring has taken place.
For years, we as a community have been asking Microsoft to modernise NAV in order to be more attractive to young developers and move to modern development methods.
Wave II is the result of a plan that started execution many years ago and the managers who executed the plan no longer work at Microsoft. This is scary and in a series of blog posts I’ll illustrate the challenges you can expect as a partner when you try to move your solutions to this new platform.
Today I’ve analysed the impact of the refactoring done my Microsoft on the AppSource solution I’ve developed for ForNAV. The Customizable Report Pack. After my analysis Michael Nielsen and I carefully concluded that Microsoft in our estimates has broken 99,9% of all solutions on AppSource and each and everyone will have to go through a certain level of refactoring.
In the next few blog posts I’ll explain some of our challenges based on what I’ve found in the new System App that is publically available on GitHub. Our challenges with the new Base App are limited, but even if they were huge I think this is still under NDA and in private preview. Need to be careful here. Hopefully the BaseApp will be publically available by the time my posts reach this part.
The Upgrade Dream Shattered
Let’s get back to the title of the blog. This was not just there as click bait and I will elaborate on that.
Upgrading Navision has always be a challenge. I don’t think anyone in the community disagrees to call that the Achilles’ heel of our framework so when Microsoft management used this as a reason to change we do development in NAV not a lot dared to think about complaining here.
In the same time a our community started to rant that NAV development was not modern enough and they demanded change.
The idea was to make upgrading easier for both Developers/Partners and Customers. As long as partners would migrate their solutions to an extension life would be easy. If customers moved to BC-Cloud they would be upgraded automatically.
This has consequences that some might say are unexpected and others would clame “I told you so”.
From a partner perspective the first crack occured when Codeunit 1 was removed. Not a major change but enough to keep everyone busy and break most of the solutions out there. It made it especially hard on ISV’s that try to keep a codebase in synch with many NAV versions out there.
With this Fall release it becomes clear that there is no such thing as a free ride. For example this line of code will no longer compile:
Which all of us will recognise as being present in 95% of all customers customized reports.
The first extensions on AppSource are already rated with 1 star by customers because they simply don’t work or are not easy enough to setup. For most partners the economic value of an extension is not high enough to justify the cost.
From a Customers perspective it’s also not all sunsine. Customers may have asked Microsoft for easier upgrades, but nobody ever anticipated that if you have a large company with for example multiple locations your IT department can never keep up explaining new features and changes to users. Many companies still struggle with (sometimes older) users who simply remember to click on the third button from the right and if that is suddenly the second button they can’t do their work.
I had this experience myself. I use Exact Online for my accounting. Not out of free will but because my accountant supports it and I have to pay extra to run other software. When I got back from vacation last week I quickly wanted to check my balances and the dashboard had been completely redesigned. A quick check that should have been seconds became 15 minutes and it was even full of weird errors.
On top of this hard to manage experience most Business Central customers I work with have customizations. Per-Tenant extensions. In some cases they have their own Invoice report with, yes, the line of code that will change the language.
These per-tenant extensions will break with Fall Update and the customers will be forced to pay the partner for the upgrade, where in the past they had the option to continue on the old code at least until off-season where they have time.
So all concluded I think it is fair to say the marketing people can stop claiming that the upgrade problem has been fixed. It’s not and in some ways it has gotten worse.
As said this is just the first post in a series. My head is totally full of ideas and stuff I want to share.
Business Central is still by far the best customizable ERP system. Some things are getting worse, some get better. I’m sure at some point in time someone somewhere in a corner office in Redmond will start realizing that effort needs to be put into the places where we are getting worse. I hope this series of blogs will help both partners and Microsoft move forward.
Upgrading software is hard. Not because merging software is hard. It’s hard because people are creatures of habits.
Let me give you an example. We recently upgraded from NAV 2016 to NAV2018. This means big changes to the Customer Card. I’m fine with that. While in the process I moved my customizations to a Page Extension and I was a happy IT manager/developer.