May 9, 2022
Reading time: 15 min.

Securing Customer uptime on Business Central Online

Face of Per Damngaard
Linkedin Icon
Per D. Nielsen


This blog is targeted at colleagues working with Business Central on SaaS. You can also read it as a customer if you want to get some insights of the mechanics going on behind the scenes. You will be able to participate with your partner in settingup the right procedures for your SaaS environment. A planned follow up blogpost will be more technical in nature.  

If you are an ISV or a consultancy company targeting the Business Central Online platform, you need to address the ongoing Microsoft updates. Every month there is a minorrelease and every 6 mounts a major release.

If there is no plan to handle those Microsoft updates, the system will eventually deactivate your functionality. The consequences are a disruption of ongoing businessprocesses at the costs of your customers.

Above goes whether you publish trough AppSource or are doing development customer-baseddevelopment assignments handled manually as per-tenant extensions (PTEs).  


Coding practices and storage of code

AL-code implements Extension based extra functionality to the standard Business Central, so it is kept away from the standard functionality in an “extension”. That makes updates easier because you don’t have any code merges.

GitHub in combination with Visual Code is the no-brainer way because of all the documentation found online. The code becomes very important here. As professionals we should offer the customers ownership and access to their code so they can “move on” if the “match” between Microsoft Partner and customer is nolonger there.

It is in nobody’s interest being “stuck” with each other!


Automated testing comes to the rescue

It is necessary developing automated tests. Your code might “compile”, but you can’t be sure the system behaves as you think it would unless you build tests.

As a rule you need a test for each modification you make.

Sometimes I see tests that are build isolated for each customers modification. That is a good idea, but it is not enough.

Above should be supplemented with testing of the core business flows in the business through automated testing. This can be quite time consuming but, in my opinion, there is no way around it if you are on a SaaS environment and choose to build customizations.

But even if you don’t build our customizations and use complex BC logic in specific ways, ex. planning functionality you might develop tests to ensure that the standard functionality you are activation hasn’t changed.  


An OnPrem installation is part of the testing.

Microsoft has built an extensive test suite for Business Central. When you develop your tests, you will almost always utilize Microsoft’s test framework. Simply because it is less error prone and the most efficient way to go when developing your tests.

The problem is the test framework is not available as an extension to be uploaded to the Cloud. You will need some OnPrem installation with the framework for testing.

Because there are stricter rules for coding in Business Central Online than in on an onPrem Installation you need the right test setup. You will need a “simulated” cloud environment when doing your coding and developing your tests. Often a Docker Container with a Business Central Installation is created and here you can choose the Sandbox” version. The “Code-Cop” should be enabled.

They aremultiple ways to create the OnPrem environment. Docker environments are one way to go. They created using power-scripts downloading an image that is initialized to a container with a running BC environment. But there are a lot of complexities and setting Docker up might consume some time on your side. One of essential experiences is that you will have to make sure you don’t have any anti-malware or antivirus programs running otherwise the script will fail somewhere.



Schema Breaks and code updates

Here you will have to be very careful with because the rules are not that clear from Microsoft’s side. Your App might not update if it is distributed through AppSource.  

A defensive strategi is advised that is create a new field rather than deleting the old one. In PTE’s you can do a force sync. The feature was introduced with BusinessCentral 2021 Wave 2 (BC19).


Deployment layers

 To start with you have some OnPrem environment. Because updates come from Microsoft each month it is a good idea that coding Environment can be set up easily. No critical data should be stored in it because it is fragile.

In Business Central online I also have 2 sandbox environments running. One for development and customer testing.

I have chosen to have the development layer there because the OnPrem Sandbox doesn’t behave exactly as the sandbox in BC Online.

Tests are executed on the OnPrem Sandbox installation through BC Test Tool page. When every test is successful the app is uploaded to the Development environment, next to the customer testing sandbox and then it ends up at production environment.  

Be aware that major release updates are done through all environments at once



 Simplicity has an advantage to itself. And in the good old day’s things were easier. You had to master way less elements. To hear the message “The Modern Experience” is always a bit annoying to me. I think it is because the old qualities of simplicity and efficiency are ignored stressing everything new is just to the better.

On the other side – building products – scalability wasn’t there with the old tools. Yes, it has become more complicated doing development. But the gain for Customers and Partners overweight’s the cost. Always being “current”, building real products with the possibility to support customers idiosyncratic business processes is of gigantic value.

It is understandable that Business Central has a great momentum in the market.

About the Author

Per Damsgaard Nielsen: Partner and Consultant in Dynamics Property. MBA (University of Aarhus), Practical experience as CFO, property manager, consultant, team lead, product manager (project oriented production), project manager. Motto: "I would rather understand 80% of all the activities in the value chain than 800% of a single piece of activity in it!". Navision/NAV/BC since 1989.
Åbogade 15
DK-8200 Århus N.

CVR. 38 17 78 85
Microsoft Partner