Upgrading from Dynamics NAV 2009 R2 Classic to BC25 in the cloud

Upgrading from Dynamics NAV 2009 R2 Classic to BC25 in the cloud

Recently I had the pleasure of upgrading a client solution from an Dynamics NAV 2009 R2 to the cloud. That was quite the journey. It took 3 days even skipping all customizations and only converting master data and history transactions and documents.

Also, luckily the solution did not utilize any add-ons because that would include an extra level of conversion and upgrading.

Considerations before the upgrade

Before the upgrade, it is important to consider several things, as shown in the illustration below:

  1. Does a localization for my country exist in the cloud?
  2. Can all partner customizations be upgraded to cloud?

    If they include some of these:

    1. Dot-Net code that is not covered in AL
    2. Custom DLLs
    3. File handling
    4. Control-Addin using Windows Forms

    Then other solutions must be considered

  3. Can any of the partner customizations be replaced by new functionality, e.g. mail handling.
  4. Do all my add-ons provided by ISV partners provide conversion to the cloud?
  5. Do all my existing add-ons provided by ISV partners exist in the cloud?
  6. The report designer changed drastically from Dynamics NAV 2009 to RDLC and it is possible to convert directly from the classic design to RDLC using a free tool from ForNav, but there are still considerations to this:
    1. The customized reports or something similar could be added to the base application by Microsoft
    2. Maybe Cues or filtered lists can replace some of the customized reports
    3. The old reports might not have been used for years, so why convert them?
    4. The users can use Custom Report Layout to perform layout changes themselves
    5. Power BI provides much better statistics than RDLC ever could

    My advice is to only convert the external reports and then later create custom reports only if the users can provide a justified need for it.

Secondly, the users will have to switch user interface at least once. Many customers got stuck on the Dynamics NAV 2009 R2 because the users did not want to switch from the classic client to the RoleTailored client. The user interface has changed a couple of times since then:

  • Dynamics NAV 2009 Classic
  • Dynamics NAV 2009 Roletailored
  • Dynamics NAV 2013
  • Dynamics NAV 2013 R2
  • Do not mention the web client in Business Central BC14 (Spring Release 2019)
  • Business Central BC15 (Fall Release 2019)
  • Business Central SaaS

Since users hate when the user interface changes, it is important to consider how many steps should be made.

The necessary steps up to the cloud are:

  1. Navision 5-0 -> Dynamics NAV 2009 R2 (Many have already made the technical upgrade in order to run an earlier version on a contemporary server, but that might not be a base application upgrade)
  2. Dynamics NAV 2009 -> Dynamics NAV 2013 (This is necessary in order to convert the Dimension Entries to Dimension Set Entries)
  3. Dynamics NAV 2013 -> Dynamics NAV 2015 (this is the earliest version that can be upgraded to Business Central BC14 (Spring Release 2019)
  4. Business Central BC14 -> BC24 (Spring Release 2024) It is not possible to upgrade directly to a BC25 despite some of the documentation from Microsoft.
  5. Business Central BC24 (Spring Release 2024) -> BC25 (Fall Release 2024)

Other considerations are if we want to convert all the way from Dynamics NAV 2009 to BC25 or stop at some point? If the Upgrade comes from any other version than Dynamics NAV 2009 or 2013, it is tempting to stop at BC14 (Spring Release 2019). Why? Because the user interface remains the same and the BC14 version includes both the C/Side Development environment and the AL Development.

Advantage: This way it is possible to perform an upgrade to BC14 and then slowly move all customizations from C/Side to AL. This way the expense can be spread over several years instead of doing a major upgrade of everything, costing a lot of money.

Disadvantage: Some ISV partners do not provide their solutions as Apps for BC14 and it is therefore necessary to install them in C/Side. Another thing is that you do not get all the exiting new stuff that Microsoft provides every month, and the R&D from Microsoft is extensive, providing new functionality every month. And lastly, Microsoft are introducing a surcharge to solutions that are not complying with universal code.

The upgrade process

The first thing I learned was that ALL the relevant versions AND developer licenses for all the versions had to be installed on the machine as well as SysAdmin or at least dbOwner access on the SQL server, so I diligently downloaded all the newest versions from the Microsoft Download sites:

Released Cumulative Updates for Microsoft Dynamics NAV 2013 – Microsoft Support

Released Cumulative Updates for Microsoft Dynamics NAV 2015 – Microsoft Support

Released cumulative updates for Microsoft Dynamics 365 Business Central Spring 2019 Update on-premises – Microsoft Support

Dynamics 365 Business Central on-premises 2024 release wave 1 updates – Business Central | Microsoft Learn

Dynamics 365 Business Central on-premises 2024 release wave 2 updates – Business Central | Microsoft Learn

Install them on the same machine. Then it is possible to start.

To make life for you guys easier, I have stored all my PowerShell script files here:

https://ba-consult.dk/downloads/UpgradeNAV2015_to_BC25.zip

The scripts are provided as is with no warranty at all

The process can be divided into seven major steps:

From earlier versions to Dynamics NAV 2009

This is the recipe provided by Saurav Dhyani:

From NAV 5 TO NAV 6 / 6SP1 / 6 R2 no data migration is required; only technical merging need to be done.

The Data Migration Upgrade Tool is available from NAV 3.7 or 4.3 to NAV 2009.

If you are using NAV 5.0 you need to follow these steps –

1. Do Technical Merging. (Object Merging)

2. Open the Client Database in Version 2009 / 2009 SP1 / 2009 R2.

3. Convert the Database.

4. Delete all objects except tables.

5. Import & replace New Merged Objects Completed in Step 1.

Steps are listed in the NAV 2009 / NAV 2009 SP1 / NAV 2009 R2 DVD at below location –

UpgradeToolKit\Documents\Upgrade Quickguides Upgrade Quick Guide 500_2009.doc

Dynamics NAV 2009 R2 to Dynamics NAV 2013

This step is necessary mainly because of the conversion of Dimension Ledger entries to Dimension Set Ids. The Dimension Entries posted a massive problem causing dead locks in larger solutions. The conversion could go from 10-20 million of entries down to 1.600, which has been known to take a long time in some larger solutions. Another big change was the deprecation of the BOM journal and introduction of the Assembly module.

Microsoft Learn still provides a step-by-step guide on how to do this, and it can be found here:

Upgrading to Microsoft Dynamics NAV 2013 | Microsoft Learn

Basically, the process consisted of these steps:

  1. Preparing the solution
  2. Upgrading the application code
  3. Upgrading the data
  4. Upgrading any add-ons

My first problem was to access the solution. This was quickly solved because all users must be removed and recreated later in the cloud, so deleting all records in these tables gave access to the solution:

  • User
  • User Metadata
  • User Personalization
  • Windows Access Control
  • Windows Login

With no users in the database all users will automatically become super users.

The actual upgrade process follows this path:

All the fob files needed for the upgrade process can be found in the installation folder of Dynamics NAV 2013:

And you end up with an upgraded Dynamics NAV 2013 database.

Upgrading Dynamics NAV 2013 to 2015

There is no direct upgrade path from Dynamics NAV 2013 to BC14 (Business Central Release 2019 Wave 1 or Spring Release – or whatever they called it at that time) therefore, it was necessary to include a step to Dynamics NAV 2015.

It might not have been necessary for me to import all new objects that were not tables since this was only a stepstone in the data upgrade on the way to the cloud, but I did not dare to deviate from the upgrade process (tried once and had to start all over again).

In this case, I used this guide from Microsoft that goes all the way to Dynamics NAV 2018 (BC11), but I stopped after upgrading to Dynamics NAV 2015 (BC8). The difference in Dynamics NAV 2015 is that now it is possible to use PowerShell and that makes the documentation of the upgrade a lot easier. I found this guide:

Upgrading the Database – Dynamics NAV | Microsoft Learn

This part of the upgrade was made in the C/Side Development Environments of Dynamics NAV 2013 and 2015.

I followed the Upgrade process as described, however, stopping at Dynamics NAV 2015:

Task 1: Prepare the old database

Task 2: Create a full SQL backup of the old database on SQL Server

Task 3 Uninstall all V1 extensions in old database

Skipped this because it is not necessary for upgrading

Task 4: Upload the Microsoft Dynamics NAV 2018 license to the old database

Task 5: Delete all objects except tables from the old database

Task 6: Uninstall (optional) the old product and install the new product

Task 7: Clear Dynamics NAV Server instance and debugger breakpoint records from old database

Task 8: Convert the old database to the Microsoft Dynamics NAV 2015 format

Task 9: Import the upgraded application objects and upgrade toolkit objects into the converted database

Task 10: Connect a Microsoft Dynamics NAV 2015 Server instance to the converted database

Task 11: Compile all objects that are not already compiled

Task 12: Run the schema synchronization on the imported objects

Task 13: Run the data upgrade process

Task 14: Import upgraded permission sets and permissions by using the Roles and Permissions XMLports

Task 15: Set the language of the customer database

Task 16: Register client control add-ins

Skipped this because it is not necessary for upgrading

Task 17: Publish and install/upgrade extensions

Skipped this because they do now exist in Dynamics NAV 2015

Task 18: Update the Dynamics NAV Web client configuration file (navsettings.json)

Skipped this because it is not necessary for upgrading

Task 19: Delete the upgrade objects

I did try to skip some steps and directly from Dynamics NAV 2009 R2 to 2015 using these objects:

But I had to start over and therefore took the long way from 2009 to 2013 to 2015.

Now I had a fully functional Dynamics NAV 2015 database (almost) and could continue to next step.

Dynamics NAV 2015 to Business Central 14 (2019 Spring Release )

Here we have a comprehensive upgrade description for the process:

Upgrading to On-Premises v.14 – Business Central | Microsoft Learn

In the upgrade process, more and more are executed in PowerShell, so updating the license file, uninstalling all extensions and shutting down the service tier could be done here.

Since I came from Dynamics NAV 2015 There were no extensions in the database, not even version 1 extensions, so these were not necessary.

The steps included:

Task 1: Create full SQL backup of old database

Task 2 Uninstall all extensions in old database

Task 3: Upload Business Central partner license to old database

Task 4: Delete all objects except tables in old database

Task 5: Clear server instance and debugger breakpoint records in old database

Task 6: Convert old database to Business Central

Task 7: Import upgraded application objects to converted database

Task 8: Connect a Business Central Server instance to converted database

Task 9: Compile all objects in converted database

Task 10: (Upgrade from Dynamics NAV 2018 or Business Central Fall 2018 only ) Increase the application version of converted database

Skipped this because it is not necessary for upgrading from 2015

Task 11: Run the schema synchronization on converted database

Task 12: Run data upgrade on converted database

Task 13: Upgrade JavaScript-based control add-ins to new versions

Task 14: Publish and generate symbols for extensions

Task 15: Upgrade or repair V2 extensions

Task 16: Publish and install local functionality extensions

Task 17: Import permission sets and permissions

Task 18: (Optional) Import data encryption key

Skipped this because it is not necessary for upgrading

Task 19: Set the language of customer database

Task 20: (Optional) Update Web Server instance configuration file

Task 21: (Optional) Delete upgrade objects

This left me with an upgraded BC14 database.

The next step now is to consider which customizations that must be converted to apps and included in the upgraded version. The goal is to only include the absolute most important customizations. However, another approach is to convert all customizations to an app and then delete customizations that are not necessary.

Business Central 14 (2019 Spring Release) to Business Central 24 (2024 Spring Release)

Since it is not possible to upgrade from BC14 to BC25, an extra step of upgrading is necessary.

This is where the Base Application is moved from C/Side to Apps. Also, several Events have been moved or deprecated, so if you utilized any events in your object conversion, they need to be checked.

Also, the Base Application is now split into multiple apps:

The Description can be found here:

Upgrading Unmodified C/AL Application to version 24 – Business Central | Microsoft Learn

Prerequisites

Task 1: Install version 24

Task 2: Upgrade permission sets

Task 3: Prepare version 14 databases

Task 4: Convert the application database to version 24

Task 5: Configure version 24 server for “DestinationAppsForMigration”

Task 6: Import version 24 license

Task 7: Publish extensions

Task 8: Restart server instance

Task 9: Synchronize tenant with the extensions

Task 10: Upgrade data

Task 11: Install 3rd-party extensions

Task 12: Upgrade control add-ins

Task 13: Install upgraded permissions sets

Task 14: Change application version

Post-upgrade tasks

Business Central 24 (2024 Spring Release) to Business Central 25 (2024 Fall Release)

I thought that this would be an easy upgrade, but it turned out almost as complicated as the previous with many steps and some steps need to be performed in the SQL Server Management Studio.

Install the full-text search feature on the SQL server instance

By advised that there is a big difference between BC25.0 and BC25.2, so make sure to bypass the BC25.0 and BC25.1 and go directly for the BC25.2.

The description can be found here:

Upgrading Microsoft System and Base Application to Version 25 – Business Central | Microsoft Learn

Again, in BC25, Microsoft have split the base application up into multiple apps if you upgrade from BC15 or later:

Now the Base Application consists of:

  • Microsoft Application: Does not contain any objects but functions as a frontend providing the app id for the solution. This allows Microsoft to change the underlying apps without breaking changes.
  • Microsoft Base Application: Provides business processes that are typical for small and mid-sized companies, such as sales and purchasing, and customer and vendor management, plus complex processes, such as assembly, manufacturing, service, and directed warehouse management.
  • Microsoft Business Foundation Application: contains modules that provide ERP related functionality that apply to all or none of the application domains.

    Read more about it here:
    The New Business Foundation In Business Central – Business Central Geek

  • Microsoft System Application: contains modules that provide ERP agnostic functionality. These are mostly technical features which any application needs.
  • System Symbols
  • System Objects: All objects in the 2.000.000.000 range

Microsoft will continue to break up the application into more manageable sizes and later allow Pull Requests directly to the Microsoft code.

Task 1: Install version 25

Task 2: Upgrade permission sets

Task 3: Prepare the existing databases

Task 4: Convert application database to version 25

Task 5: Configure version 25 server

Task 6: Import version 25 license

Task 7: Synchronize tenant

Task 8: Publish extensions

Task 9: Synchronize tenant with extensions

Task 10: Upgrade data

Task 11: Install new Microsoft or reinstall 3rd-party extensions

Task 12: Upgrade control add-ins

Task 13: Install upgraded permissions sets

Task 14: Change application version

Post-upgrade tasks

Going to the cloud

I hate to say it, but the cloud migration was almost the easiest part of the whole upgrade process. Of course, there are several tests that must be done before the migration can start:

  • User Management must be designed from scratch
  • How should printing be done in the cloud solution
  • Any Web services that are published to service external applications
  • Any file integrations need to be redirected to Azure Blob Storage, SharePoint or OneDrive.
  • External document must be created
  • Email scenarios with additional attachments must be defined.

The process is described here:

Migrate On-Premises Data to Business Central Online – Business Central | Microsoft Learn

Component Description
On-premises database This database is the on-premises SQL Server database or an Azure SQL Database that stores business data for the companies to migrate to the cloud.
Azure Data Factory A key component of the data migration is Azure Data Factory. Azure Data Factory is a managed cloud service that’s built for migrating large amounts raw data across data sources and controlling data integration projects. Azure Data Factory migrates the data between on-premises and online directly. In other words, it doesn’t look at any permissions within the applications you’re transferring data between—only SQL permissions.
Pipelines Pipelines are the main elements of Azure Data Factory. Pipelines are groupings of activities that copy, move, and transform data, and also orchestrate its flow.
Integration Runtime The Integration Runtime component is the compute infrastructure of Azure Data Factory. There are two Integration Runtime instances in the end-to-end process. The first instance securely copies data from on-premises to the cloud, where the pipelines are created. If the on-premises database is an SQL Server database, you use a self-hosted integration runtime. This runtime is installed locally on the on-premises network and registered in Azure Data Factory. If the on-premises database is an Azure SQL Database, an Azure Integration Runtime is used. From the pipeline, the Azure Integration Runtime then moves the data to the online database for the environment.
Online database This database in the Azure SQL Database of the Business Central environment that you’re migrating data to.

The process consists of these steps:

  1. Preparation

    All customized Apps must be installed in the Cloud version providing the exact same table structure in the cloud as in the on-premise version.

    Any tables existing on-premise that are not represented in the cloud version will be ignored.

  2. Cloud migration setup

    This is where the Azure Integration Runtime is installed on the SQL Server

    The Integration Runtime forms the link between the SQL Server and the Data Factory in Azure

  1. Data replication

    The actual data migration is performed in Business Central in the Cloud Migration Setup and the Cloud Migration Management windows:

  1. Data upgrade
  2. Completion and follow-up
  3. Set up user access
  4. Go live

These were my experiences with the upgrade. I hope that it can help others to go through the same journey.

Leave a Reply

Your email address will not be published. Required fields are marked *