Product Version Mismatch

Error

The version of the on-premises deployment does not match the requirements of Business Central online:

Solution

Official documentation: 

If you have tried to select both Dynamics 365 Business Central current version (v.xx) and Dynamics 365 Business Central earlier version on the Product Selection page, then check the applicationversion field on [$ndo$tenantdatabaseproperty], [$ndo$tenantdatabaseversion] and [$ndo$tenantproperty tables, in your local SQL database. The version should match.

If, for some reason, the application version is empty or does not match the current database version, you can fix the version on these tables by running the PowerShell script below:

Note: Replace the bcInstanceName and applicationVersion variable values with the correct Server Instance name and version. For the Application Version you can enter just the major and minor number.

Copy
Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\220\Service\Management\Microsoft.Dynamics.Nav.Management.dll"
$bcInstanceName = "LSCentral"
$applicationVersion = "22.2"
 
Set-NAVApplication -ServerInstance $bcInstanceName -ApplicationVersion "$applicationVersion.0.0" -Force
Sync-NAVTenant -ServerInstance $bcInstanceName -Mode Sync -Tenant default 
Start-NAVDataUpgrade -ServerInstance $bcInstanceName -FunctionExecutionMode Serial -Tenant default

Run the following SQL script to retrieve the content for these tables:

Copy
USE [<database name>]
SELECT * FROM [dbo].[$ndo$tenantdatabaseproperty]
SELECT * FROM [dbo].[$ndo$tenantdatabaseversion]
SELECT * FROM [dbo].[$ndo$tenantproperty]

The Application Version must not be empty and should match the version on the on-premises environment. Due to some issues in a previous upgrade, the Application Version can be pointing to an earlier version number and needs to be updated.

Note: Table [$ndo$tenantdatabaseversion] should have one single row with the correct version, so delete any additional rows that might exist.