Skip to main content

How to update your Business Central to Latest CU

Introduction: 

There are times when Microsoft releases the latest major version upgrade for Business Central Upgrade and you face many issues with it.
As soon as the bugs are reported to Microsoft, they start to fix them and ask you to upgrade to a certain Cumulative Update.
In this blog, I will be sharing my experience with Business Central v21 CU0 upgrade to Business Central v21 CU2.

Pre-requisites: 

  • Business Central DVD for Latest CU
  • Basic Understanding of Business Central CU Updates

Books & References: 

Demonstration: 

1. Check the current state of BC:
As part of knowing the current state of your Business Central environment, I'm assuming that your Business Central Environment will have some data in the standard Base App also there will be customization with extended tables and newly created tables.
Customization - TableExtension on Customer Table 

Customization - Custom Table created
Make a note of the data that is present in your environment. In my case the data is present in Base App as well as TableExtension(Customer) and Table

2. Prepare Business Central Environment for CU upgrade:
In Order to start with BC Upgrade process it is recommend to have appropriate license and unsintall all the apps that are present as Extension.

Uninstall All the Apps installed 
Get-NAVAppInfo -ServerInstance $BcServerInstance -Tenant $TenantId | % { Uninstall-NAVApp -ServerInstance $BcServerInstance -Tenant $TenantId -Name $_.Name -Version $_.Version -Force}
This command will loop through all the extensions and will try to uninstall them.


Unpublish the System App 
Unpublish-NAVApp -ServerInstance $BcServerInstance -Name System
This command will Unpublish the System App. As System App is Symbol only, it cannot be installed. Hence, you will need to Unpublish.

Stop NAVServerInstance
Now you can stop the Business Central Server Instance.
Stop-NAVServerInstance -ServerInstance $BcServerInstance


3. Upgrade Platform:
You can now Uninstall your Business Central through Add/Remove programs.
This wizard will completely uninstall your current version of Business Central.
Reboot your machine before running the installation of upgraded CU version.
During installation of Business Central version, select the following components only.
  • AL Development Environment
  • Server
  • Web Server Components
Follow the installation steps as per screenshots below-
Business Central Setup Wizard

Accept EULA

Select Advanced Installation

Choose an Installation Option

Choose Developer

Customize you installation

Set SQL Database to BLANK

Business Central Installation

Note that the DatabaseName should be BLANK. If you set the Database Name of your old version of Business Central, the installation will fail.

Now link you old database to Business Central Server Instance using Set-NAVServerConfiguration

Do not Restart/ Start Business Central Server Instance yet.
You can take a database checkpoint backup at this point in case you mess things up.

4. Upgrade Application:

Convert Database -  This will convert the application as per the latest installation. If your Database is already converted then you will get errors as follows.

You can Restart/Start your Business Central Server Instance now. If your Database has converted successfully then your BC Server Instance will start.

Import-BC Partner License:
Ensure you have the Developer License uploaded to the Database. You can also upload License using 
Import-NAVServerLicense -ServerInstance BC210 -LicenseFile <LICENSE FILE PATH>


Publish NAV Apps :
1. System App - You will get this App in DVD\ModernDev\program files\Microsoft Dynamics NAV\210\AL Development Environment
This App is necessary before all other apps are installed.

2. System Application - You will find the System Application in DVD\Applications\system application\source.
To publish System Application use the command  -Serverbelow
Publish-NAVApp -ServerInstance BC210 -Path "C:\Users\Olister\Downloads\Dynamics.365.BC.49990.CA.DVD\Applications\system application\source\Microsoft_System Application.app" -SkipVerification

You will also need to Sync NAV App.
Sync-NAVApp -ServerInstance BC210 -Name 'System Application'

You will also need to Upgrade the App Data.


3. Base Application - You will find the Base Application in DVD\Applications\BaseApp\source.
"C:\Users\Olister\Downloads\Dynamics.365.BC.49990.CA.DVD\Applications\BaseApp\source\Microsoft_Base Application.app" -SkipVerification

You will also need to Sync NAV App.
Sync-NAVApp -ServerInstance BC210 -Name 'Base Application'

You will also need to Upgrade the App Data.
Start-NAVAppDataUpgrade -ServerInstance BC210 -Name 'Base Application' -Version 21.2.49946.49990

4. Application - You will find the Base Application in DVD\Applications\Application\source.
"C:\Users\Olister\Downloads\Dynamics.365.BC.49990.CA.DVD\Applications\Application\source\Microsoft_ Application.app" -SkipVerification

You will also need to Sync NAV App.
Sync-NAVApp -ServerInstance BC210 -Name 'Application'

You will also need to Upgrade the App Data.
Start-NAVAppDataUpgrade -ServerInstance BC210 -Name 'Application' -Version 21.2.49946.49990

Also, you can upload the other Microsoft Extensions as well as Customizations to get more functionality. 

Set NAVApplication: This command will set the Application version to the Version No you provide.
Set-NAVApplication -ServerInstance BC210 -ApplicationVersion 21.2.49946.49990  -Force

Sync-NAVTenant: This command synchronizes schema to the DB.

Start NAV Data Upgrade: This command will upgrade the Data as per the latest extensions in BC.
To start the NAV Data Upgrade, you need to close all the active sessions. 
Start-NAVDataUpgrade -ServerInstance BC210 -FunctionExecutionMode Serial -Force -Tenant default

To know the status of the NAV Data Upgrade command, run the Get-NAVDataUpgrade -ServerInstance BC210 -ErrorOnly command

Install Extensions:
At the bare minimum, you will need to install System Application, Base Application, and Application to start your BC environment.
 Run Install-NAVApp -ServerInstance BC210 -Name 'Base Application' -Version 21.2.49946.49990   to install the extension. in this case, I have installed the Base Application

You will also need to update the Customer License as per the latest BC version and import the license in BC.

Restart Server Instance once all the upgrade and installation is completed and you are ready with the environment.

Now that I have updated Business Central from BC 21 CU0 to BC21 CU2 you can see the update.



Conclusion:

Well, this is how you can upgrade your CU updates for a certain BC version. There are CU updates released every month and you can update your Business Central On-Prem to the latest ones. When Microsoft officially stops releasing these CU updates, it's time to upgrade your BC to the latest major version. 
Feel free to connect with me at olisterr@outlook.com if there are any issues.


Comments

Popular posts from this blog

Something went wrong. An Error occurred - Error Resolution

Introduction: With the installation of NAV 2018 or BC On-premise, I have observed that when creating New Server Instance and New WebServer Instance, you will get the error 'Something went wrong. An Error occurred '. I referred to the community questions below but didn't find my resolution. Hence, I decided to write this blog. Pre-requisites: Microsoft Dynamics Business Central - On-Premise / NAV 2018 Understanding of Business Central Authentication  Books & References: https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/261301/nav-2018-web-client-an-error-has-occurred https://community.dynamics.com/business/f/dynamics-365-business-central-forum/421987/error-something-went-wrong-an-error-has-occurred-azure-ad-tenant Demonstration: 1. Creation of NAVServerInstance: In order to create NAVServerInstance, you can either add the Server Instance through Business Central Administration or Powershell command. Add Instance - Business Central Administration Add Insta...

How to resolve 'Edit in Excel' issues

  Introduction: As you know that D365 BC offers Edit in Excel functionality. But manipulating or customizing such a  standard functionality is difficult as there is not much control available. Hence, solving issues is also a difficult task. I will be resolving the issue for this specific issue, however, the debugging steps are similar. Pre- requisites : ODATA V4 Connectivity tool for Webservices Microsoft Dynamics 365 Business Central Books & References: https://community.dynamics.com/business/f/dynamics-365-business-central-forum/448226/issue-with-excel-add-in/ Demonstration: The way Edit in Excel works is that for a given page a Webservice is created adding PageID and Page Name. Hence, there are some Webservice connectivity checks in place to validate. 1. Edit in Excel Custom Action on the page: If you are adding Edit in Excel Action on the page, please ensure that you are providing appropriate PageName and Filter criteria as Webservice is using these parameters Refer Ed...

Installing LS Central - POS on local machine

Introduction: In this blog, I'm attempting to capture the LS Central - POS installation process on Local Machine. This blog has nothing to do LS Central - Server Setup for POS. LS Retail / LS Central - On Premise POS Pre- requisites : LS Central Installed on Server SSL Setup on LS Server (https://www.olisterr.tech/2020/03/how-to-setup-navuserpassword-with-ssl.html) LS - POS Installer Business Central - On Premise Installer Demonstration: Once your LS Retail / LS Central POS is setup on the main server. Just prior to Go-Live, you will actually have to install this POS on multiple systems and connect these POS to the main server with LS Retail / LS Central. 0.Preparation: Prior to actually installing Business Central On-Premise Windows Client, you need to make sure that you're able to ping the target with the correct Port number. For this I made use of PS-Ping tool.  PSPing - IP Address: Port If you're unable to PS-Ping the correct IP with Port number, simply check the Advan...