Upgrading Unmodified C/AL Application to Version 21

Use this scenario if you have a Business Central Spring 2019 (version 14) application or earlier that doesn't include any code customization. Your solution might include Microsoft (first party) extensions and customization extensions (3rd-party). With this upgrade, you'll replace the C/AL base application with the new Microsoft System and Base Application extensions. The result will be a fully upgraded Business Central 2022 release wave 2 (version 21) application and platform.

Upgrade on unmodified Business Central application.

General information

Single-tenant and multitenant deployments

The process for upgrading is similar for a single-tenant and multitenant deployment. However, there are some inherent differences. With a single-tenant deployment, the application code and business data are in the same database. In a multitenant deployment, application code is in a separate database (the application database) than the business data (tenant). In the procedures that follow, for a single-tenant deployment, consider references to the application database and tenant database as the same database. Steps are marked as Single-tenant only or Multitenant only where applicable.

Personalization and customizations

Since version 14, the way user profiles are defined, stored, and customized has undergone a major overhaul. This change means user personalization and profile customizations that were done in the Windows Client are lost after upgrade. The legacy profiles remain available but their associated profile configurations are discarded. Page customizations must be either recreated using the latest Business Central client or as an AL extension. For more information about personalization, customization, and Al profiles, see:

PowerShell variables used in tasks

Many of the steps in this article use PowerShell cmdlets, which require that you provide values for various parameters. To make it easier for copying or scripting in PowerShell, the steps use the following variables for parameter values. Replace the text between the " " with the correct values for your environment.

$OldBcServerInstance = "The name of the Business Central server instance for your previous version, for example: BC140"
$NewBcServerInstance = "The name of the Business Central server instance for version 21, for example: BC210"
$TenantId = "The ID of the tenant to be upgraded. If not using a multitenant server instance, set the variable to default, or omit -Tenant parameter."
$TenantDatabase = "The name of the Business Central tenant database to be upgraded, for example: Demo Database BC (19-0)" 
$ApplicationDatabase = "The name of the Business Central application database in a multitenant environment, for example: My BC App DB. In a single-tenant deployment, this is the same as the $TenantDatabase" 
$DatabaseServer = "The SQL Server instance that hosts the databases. The value has the format server_name\instance_name, For example: localhost\BCDEMO"
$SystemAppPath = "The file path and name of the System Application extension for the update, for example: C:\DVD\Applications\system application\Source\Microsoft_System Application.app"
$BaseAppPath = "The file path and name of the Base Application extension for the update, for example: C:\DVD\Applications\BaseApp\Source\Microsoft_Base Application.app"
$ApplicationAppPath = "The path and file name to the Application application extension for the update, for example: C:\DVD\Applications\Application\Source\Microsoft_Application.app"
$NewBcVersion = "The version number for the current System, Base, and Application extensions that you'll reinstall, for example: 21.24582.0"
$PartnerLicense = "The file path and name of the partner license"
$CustomerLicense = "The file path and name of the customer license"
$AddinsFolder = "The file path to the Add-ins folder of version 21 server installation, for example, C:\Program Files\Microsoft Dynamics 365 Business Central\210\Service\Add-ins."

Prerequisite

Task 1: Install version 21

  1. Download the latest available update for version 21 that is compatible with your version 14.

    For more information about compatible updates and versions, see Business Central Upgrade Compatibility Matrix.

    The guidelines in this article assume that you're running the latest available update.

  2. Before you install version 21, it can be useful to create desktop shortcuts to the version 14.0 tools, like the Business Central Administration Shell and Dynamics NAV Development Shell because the Start menu items for these tools will be replaced with the version 21 tools.

  3. Install Business Central version 21 components.

    You'll have to keep version 14 installed to complete some steps in the upgrade process. When you install version 21, you must either specify different port numbers for components (like the Business Central Server instance and web services) or stop the version 14.0 Business Central Server instance before you run the installation. Otherwise, you'll get an error that the Business Central Server failed to install.

    For more information, see Installing Business Central Using Setup.

Task 2: Upgrade permission sets

Version 18 introduced the capability to define permissions sets as AL objects, instead of as data. Permissions sets as AL objects is now the default and recommended model for permissions. For now, you can choose to use the legacy model, where permissions are defined and stored as data in the database. Whichever model you choose, there are permission set-related tasks you'll have to go through before and during upgrade.

For more information, see Upgrading Permissions Sets and Permissions.

Task 3: Prepare version 14 databases

  1. Make backup of the databases.

  2. Disable data encryption.

    If the current server instance uses data encryption, disable it. You can enable it again after upgrading.

    For more information, see Managing Encryption and Encryption Keys.

    Instead of disabling encryption, you can export the current encryption key, which you'll then import after upgrade. However, we recommend disabling encryption before upgrading.

  3. Start Business Central Administration Shell for version 14 as an administrator.

    For more information, see Run Business Central Administration Shell.

  4. Uninstall all extensions from the old tenants.

    In this step, you uninstall any extensions that are currently installed on the database.

    1. Get a list of installed extensions.

      This step is optional, but it can be useful to the names and versions of the extensions.

      To get a list of installed extensions, use the Get-NAVAppInfo cmdlet.

      Get-NAVAppInfo -ServerInstance $OldBcServerInstance -Tenant $TenantId
      

      For a single-tenant deployment, set the <tenant ID> to default.

    2. Uninstall the extensions.

      To uninstall an extension, you use the Uninstall-NAVApp cmdlet.

      Uninstall-NAVApp -ServerInstance $OldBcServerInstance -Name <extensions name> -Tenant <tenant ID> -Version <extension version> -Force
      

      Replace <extension name> and <extension version> with the exact name and version the published System Application.

      For example, together with the Get-NAVApp cmdlet, you can uninstall all extensions with a single command:

      Get-NAVAppInfo -ServerInstance $OldBcServerInstance -Tenant $TenantId| % { Uninstall-NAVApp -ServerInstance $OldBcServerInstance -Tenant $TenantId -Name $_.Name -Version $_.Version -Force}
      
  5. Unpublish all extensions from the application server instance.

    To unpublish an extension, use the Unpublish-NAVApp cmdlet:

    Unpublish-NAVApp -ServerInstance $OldBcServerInstance -Name <extension name> -Version <extension version>
    

    Together with the Get-NAVAppInfo cmdlet, you can unpublish all extensions by using a single command:

    Get-NAVAppInfo -ServerInstance $OldBcServerInstance | % { Unpublish-NAVApp -ServerInstance $OldBcServerInstance -Name $_.Name -Version $_.Version }
    
  6. Unpublish all system, test, and application symbols.

    To unpublish symbols, use the Unpublish-NAVAPP cmdlet with the -SymbolsOnly switch.

    Get-NAVAppInfo -ServerInstance $OldBcServerInstance -SymbolsOnly | % { Unpublish-NAVApp -ServerInstance $OldBcServerInstance -Name $_.Name -Version $_.Version }
    

    What are symbols?

  7. (Multitenant only) Dismount the tenants from the application server instance.

    To dismount a tenant, use the Dismount-NAVTenant cmdlet:

    Dismount-NAVTenant -ServerInstance $OldBcServerInstance -Tenant $TenantId
    
  8. Stop the server instance.

    Stop-NAVServerInstance -ServerInstance $OldBcServerInstance
    

Task 4: Convert the application database to version 21

This task runs a technical upgrade on the application database to convert it from the version 14 platform to the version 21 platform. The conversion updates the system tables of the database to the new schema (data structure). It provides the latest platform features and performance enhancements. The conversion adds the system symbols for the version to the database, so you don't have to manually publish the Systems extension, as you had to do with early releases.

  1. If the database is on Azure SQL Database, you may get add your user account to the dbmanager database role on the master database.

    This membership is only required for converting the database, and can be removed afterwards. This step isn't required for Azure SQL Managed Instance.

  1. Start Business Central Administration Shell for version 21 as an administrator.

  2. Run the Invoke-NAVApplicationDatabaseConversion cmdlet to start the conversion:

    Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase
    

    When completed, a message like the following displays in the console:

    DatabaseServer      : .\BCDEMO
    DatabaseName        : Demo Database BC (14-0)
    DatabaseCredentials :
    DatabaseLocation    :
    Collation           :
    

Note

When the database is on Azure SQL Database, you may get the following error:

SQL Server: Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. The statement has been terminated.

If you do, scale up the database resources in Azure SQL, then run the Invoke-NAVApplicationDatabaseConversion cmdlet again. If the conversion is successful, you can then scale it back down to its original setting and continue the upgrade.

Task 5: Configure version 21 server for DestinationAppsForMigration

When you installed version 21 in Task 1, a version 21 Business Central Server instance was created. In this task, you change server configuration settings that are required to complete the upgrade. Some of the changes are only required for version 14 to version 21.0 upgrade and can be reverted after you complete the upgrade.

  1. Set the server instance to connect to the application database.

    Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseName -KeyValue $ApplicationDatabase
    

    In a single tenant deployment, this command will mount the tenant automatically. For more information, see Connecting a Server Instance to a Database.

  2. Configure the server instance for migrate extensions to the use the new base application and system application extensions.

    Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "DestinationAppsForMigration" -KeyValue '[{"appId":"63ca2fa4-4f03-4f2b-a480-172fef340d3f", "name":"System Application", "publisher": "Microsoft"},{"appId":"437dbf0e-84ff-417a-965d-ed2bb9650972", "name":"Base Application", "publisher": "Microsoft"}]'
    

    This setting serves the following purposes:

    • When you run the data upgrade on a tenant, the server will run the data upgrade for the base and system application extensions. The base and system applications will be automatically installed on the tenant also.
    • Lets you republish extensions that haven't been built on version 21. The extensions typically include the third-party extensions that were used in your version 14. When you publish the extensions, the extension manifests are automatically modified with a dependency on the base and system applications.

    For more information about this setting, see DestinationAppsForMigration.

  3. If you want to use the permission sets defined as data, set the UserPermissionSetsFromExtensions setting to false.

    Set-NavServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "UsePermissionSetsFromExtensions" -KeyValue false
    
  4. Disable task scheduler on the server instance for purposes of upgrade.

    Set-NavServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "EnableTaskScheduler" -KeyValue false
    

    Be sure to re-enable task scheduler after upgrade if needed.

  5. Restart the server instance.

    Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
    

Task 6: Import version 21 license

If you've gotten a new Business Central partner license, make sure that it has been uploaded to the database.

  1. To upload the license, use the Import-NAVServerLicense cmdlet:

    Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense
    
  2. Restart the server instance.

    Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
    

For more information, see Uploading a License File for a Specific Database.

Task 7: Synchronize tenant

Synchronize the tenant database with the platform changes in the application database to get it ready for the new extension versions. If you have a multitenant deployment, do these steps for each tenant.

  1. (Multitenant only) Mount the tenant to the version 21 server instance.

    To mount the tenant, use the Mount-NAVTenant cmdlet:

    Mount-NAVTenant -ServerInstance $NewBcServerInstance -DatabaseName $TenantDatabase -DatabaseServer $DatabaseServer -Tenant $TenantId -AllowAppDatabaseWrite
    

    Important

    You must use the same tenant ID for the tenant that was used in the old deployment; otherwise you'll get an error when mounting or syncing the tenant. If you want to use a different ID for the tenant, you can either use the -AlternateId parameter now or after upgrading, dismount the tenant, then mount it again using the new ID and the OverwriteTenantIdInDatabase parameter.

    For upgrade, set the -AllowAppDatabaseWrite parameter. After upgrade, you can dismount and mount the tenant again without the parameter if needed.

    At this stage, the tenant state is OperationalWithSyncPending.

  2. Synchronize the tenant with the application database.

    Use the Sync-NAVTenant cmdlet:

    Sync-NAVTenant -ServerInstance $NewBcServerInstance -Mode Sync -Tenant $TenantId
    

    With a single-tenant deployment, you can omit the -Tenant parameter and value.

Task 8: Publish extensions

In this task, you'll publish the extensions. As minimum, you publish the new base application and system application extensions from the installation media (DVD). You also publish new versions of any Microsoft extensions and third-party extensions that were used on your old deployment.

Publishing an extension adds the extension to the application database that is mounted on the server instance. Once published, it's available for installing on tenants. This task updates internal tables, compiles the components of the extension behind-the-scenes, and builds the necessary metadata objects that are used at runtime.

The steps in this task continue to use the Business Central Administration Shell for version 21 that you started in the previous task.

  1. Publish the System Application extension (Microsoft_System Application.app).

    You find the (Microsoft_System Application.app in the Applications\System Application\Source folder of installation media (DVD).

    Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $SystemAppPath
    

    What is the System Application?

  2. Publish the Business Central base application extension (Microsoft_Base Application.app).

    The Base Application extension contains the application business objects. You find the (Microsoft_Base Application.app in the Applications\BaseApp\Source folder of installation media (DVD).

    Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $BaseAppPath
    
  3. Publish the Microsoft_Application extension

    The Microsoft_Application extension is a new extension introduced in 15.3. For more information about this extension, see The Microsoft_Application.app File.

    Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $ApplicationAppPath
    
  4. Publish the new versions of Microsoft extensions.

    In this step, you publish new versions of Microsoft extensions that were used on your version 14 deployment. You find the extensions in the Applications folder of the installation media (DVD).

    Publish-NAVApp -ServerInstance $NewBcServerInstance -Path "<path to Microsoft extension>"
    

    For example:

    Publish-NAVApp -ServerInstance $NewBcServerInstance -Path "C:\W1DVD\Applications\ReportLayouts\Source\Microsoft__Exclude_ReportLayouts.app"
    

    Note

    A new extension for report layouts, called _Exclude_ReportLayouts, was added in version 20. If you're coming from a version earlier than version 20, make sure to publish and install this extension to get the latest report layout features described at Get Started Creating Report Layouts.

    Note

    If you are upgrading from an India (IN) version of Dynamics NAV 2016, you must publish the following extensions to get the local functionality. The below extensions available in the DVD under the Application folder in DVD.

    Folder Extension Package
    INTaxEngine Microsoft_TaxEngine.app
    INTaxBase Microsoft_TaxBase.app
    QRGenerator Microsoft_QRGenerator.app
    INGST Microsoft_India GST.app
    INTCS Microsoft_India TCS.app
    INTDS Microsoft_India TDS.app
    INFADepreciation Microsoft_Fixed Asset Depreciation For India.app
    INGateEntry Microsoft_India Gate Entry.app
    INVoucherInterface Microsoft_India Voucher Interface.app
    INReports Microsoft_India Reports.app
  5. Publish 3rd-party extensions.

    Publish 3rd-party extensions that were used on your version 14 solution. If you have new versions of these extensions, built on version 21, then publish the new versions. Otherwise, republish the same versions that were previously published in the old deployment.

    Publish-NAVApp -ServerInstance $NewBcServerInstance -Path "<path to extension>"
    

Task 9: Restart server instance

Restart the Business Central Server to free up resources for completing the upgrade.

Restart-NAVServerInstance -ServerInstance $NewBcServerInstance

This step is important, otherwise you might experience issues when you run the data upgrade.

Task 10: Synchronize tenant with the extensions

In this task, you'll synchronize the tenant's database schema with any schema changes in the extensions.

If you have a multitenant deployment, do these steps for each tenant.

  1. Synchronize the tenant with the System Application extension.

    Use the Sync-NAVApp cmdlet:

    Sync-NAVApp -ServerInstance $NewBcServerInstance -Tenant $TenantId -Name "System Application" -Version $NewBcVersion
    

    Replace <extension version> with the exact version of the published System Application. To get the version, you can use the Get-NAVAppInfo cmdlet.

  2. Synchronize the tenant with the Base Application extension.

    Sync-NAVApp -ServerInstance $NewBcServerInstance -Tenant $TenantId -Name "Base Application" -Version $NewBcVersion
    

    Replace <extension version> with the exact version of the published Base Application.

  3. Synchronize the tenant with the Application extension.

    Sync-NAVApp -ServerInstance $NewBcServerInstance -Tenant $TenantId -Name "Application" -Version $NewBcVersion
    
  4. Synchronize the tenant with Microsoft and 3rd-party extensions.

    For each extension, run the Sync-NAVApp cmdlet:

    Sync-NAVApp -ServerInstance $NewBcServerInstance -Tenant $TenantId -Name "<extension name>" -Version $NewVersion
    

Note

If you are upgrading from an India (IN) version of Dynamics NAV 2016, you must synchronize the tenant with the India extensions.

Name
India Tax Engine
India Tax Base
QR Generator
India GSTS
India TCS
India TDS
Fixed Asset Depreciation for India
India Gate Entry
India Voucher Interface
India Reports

Tip

When you synchronize an extension, the extension takes ownership of any tables that it includes. In SQL Server, you'll notice that the table names will be suffixed with the extension ID. For example, Base Application tables will have 437dbf0e-84ff-417a-965d-ed2bb9650972 in the name. In addition, the systemId column is added to application tables that are not already part of an extension.

Task 11: Upgrade data

In this task, you run a data upgrade on tables to handle data changes made by platform and extensions.

If you have a multitenant deployment, do these steps for each tenant.

  1. Upgrade the data to the platform, system application, and base application.

    1. To run the data upgrade, use the Start-NavDataUpgrade cmdlet:

      Start-NAVDataUpgrade -ServerInstance $NewBcServerInstance -Tenant $TenantId -FunctionExecutionMode Serial -SkipAppVersionCheck
      
    2. To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress and –Detailed switches.

    This step will automatically install the base application and system application on the tenant.

  2. Upgrade the new versions of Microsoft extensions and third-party extensions.

    Complete this task to upgrade any Microsoft extension and third-party extension. Microsoft extensions used in the old deployment to new versions on the installation media. The new versions are in the Application folder of the DVD. There's a folder for each extension. The extension package (.app file) is in the Source folder.

    1. Install the Application extension.

      You'll have to install the Application extension first, otherwise you can't upgrade Microsoft extensions.

      Install-NAVApp -ServerInstance $NewBcServerInstance -Tenant $TenantId -Name "Application" -Version $NewVersion
      

    Note

    If you are upgrading from an India (IN) version of Dynamics NAV 2016, you must install the India extensions.

    Name
    QR Generator
    India Reports
    1. For each extension, run Start-NAVAppDataUpgrade cmdlet:

      Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "<extension name>" -Version "<extension version>"
      

      This step will also automatically install the new extension version on the tenant.

    Note

    If you are upgrading from an India (IN) version of Dynamics NAV 2016, you must upgrade the India extensions.

    Name
    India Tax Engine
    India Tax Base
    India GSTS
    India TCS
    India TDS
    Fixed Asset Depreciation for India
    India Gate Entry
    India Voucher Interface
  3. Install the _Exclude_ReportLayouts extension, if you published it earlier in task 8.

    Install-NAVApp -ServerInstance $NewBcServerInstance -Tenant $TenantId -Name "_Exclude_ReportLayouts" -Version $NewVersion
    
  4. (Multitenant only) Repeat steps 1 through 3 for each tenant.

Task 12: Install 3rd-party extensions

Complete this task to install third-party extensions for which a new version wasn't published. For each extension, run the Install-NAVApp cmdlet:

Install-NAVApp -ServerInstance $NewBcServerInstance -Name <extension name> -Version <extension version>

Note

If you are upgrading from an India (IN) version of Dynamics NAV 2016, you must Publish, Sync & Install India Data Migration Extension. Publish the ‘India Data Migration’ extension by running the PublishNAVApp cmdlet:

Run the following command:

Publish-NAVApp -ServerInstance <ServerInstanceName> -Path <ExtensionFileName> 

Synchronize the extension with the database by running the Sync-NAVApp cmdlet for ‘India Data Migration’ extension: Run the following command:

Sync-NAVApp -ServerInstance <ServerInstanceName> -Name <Name> -Version <N.N.N.N>

Run the following command to Upgrade the Extension Data:

Start-NAVAppDataUpgrade -ServerInstance <server instance name> -Name "<extension name>" -Version <extension 

Run assisted setup

  • Start Web Client and search for Assisted Setup and Run Setup Tax Engine for each company.
  • Search for Assisted Setup and Run Finalize Data Migration for each company.

Uninstall & unpublish extension

  • UnInstall Extension India Data Migration.app
Uninstall-NAVApp -ServerInstance <server instance name> -Name <extension name> -Version <extension version>
  • Unpublish Extension India Data Migration.app
Unpublish-NAVApp -ServerInstance <server instance name> -Name <extension name> -Version <extension version2

Task 13: Upgrade control add-ins

The Business Central Server installation includes new versions of the Microsoft-provided Javascript-based control add-ins, like Microsoft.Dynamics.Nav.Client.BusinessChart, Microsoft.Dynamics.Nav.Client.VideoPlayer, and more. If your solution uses any of these control add-ins, upgrade them to the latest version.

To upgrade the control add-ins from the client, do the following steps:

  1. Open the Business Central client.

  2. Search for and open the Control Add-ins page.

  3. Choose Actions > Control Add-in Resource > Import.

  4. Locate and select the .zip file for the control add-in and choose Open.

    The .zip files are located in the Add-ins folder of the Business Central Server installation. There's a subfolder for each add-in. For example, the path to the Business Chart control add-in is C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\Add-ins\BusinessChart\Microsoft.Dynamics.Nav.Client.BusinessChart.zip.

  5. After you've imported all the new control add-in versions, restart Business Central Server instance.

Alternatively, you can use the Set-NAVAddin cmdlet of the Business Central Administration Shell. For example, the following commands update the control add-ins installed by default. Modify the commands to suit:

Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.BusinessChart' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'BusinessChart\Microsoft.Dynamics.Nav.Client.BusinessChart.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.FlowIntegration' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'FlowIntegration\Microsoft.Dynamics.Nav.Client.FlowIntegration.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.OAuthIntegration' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'OAuthIntegration\Microsoft.Dynamics.Nav.Client.OAuthIntegration.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.PageReady' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'PageReady\Microsoft.Dynamics.Nav.Client.PageReady.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.PowerBIManagement' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'PowerBIManagement\Microsoft.Dynamics.Nav.Client.PowerBIManagement.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.RoleCenterSelector' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'RoleCenterSelector\Microsoft.Dynamics.Nav.Client.RoleCenterSelector.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.SatisfactionSurvey' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'SatisfactionSurvey\Microsoft.Dynamics.Nav.Client.SatisfactionSurvey.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.VideoPlayer' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'VideoPlayer\Microsoft.Dynamics.Nav.Client.VideoPlayer.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.WebPageViewer' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'WebPageViewer\Microsoft.Dynamics.Nav.Client.WebPageViewer.zip')
Set-NAVAddIn -ServerInstance $NewBcServerInstance -AddinName 'Microsoft.Dynamics.Nav.Client.WelcomeWizard' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'WelcomeWizard\Microsoft.Dynamics.Nav.Client.WelcomeWizard.zip')

At this point, the upgrade is complete, and you can open the client.

Task 14: Install upgraded permissions sets

In this task, you install the custom permission sets that you upgraded earlier in this procedure. The steps depend on whether you've decided to use permission sets as AL objects or as data.

For permission sets as AL objects

  1. Publish the extension or extensions that include the permission sets.
  2. Sync the extensions with the tenant.
  3. Install the extensions on the tenant.

For permission sets as data in XML

  1. Open the Business Central Web client.
  2. Search for and open the Permission Sets page.
  3. Select Import Permission Sets, and follow the instructions to import the XML file.

For more information, see To export and import a permission set.

Task 15: Change application version

After you upgrade your application, we recommend changing the value of application build number that's stored in the database and shown on the Help and Support page to match the new current version. This version isn't updated automatically when you upgrade. If you want the version to reflect the version of the update or your own version, you change it manually. This task serves two purposes. It ensures that personalization works as expected after upgrade. It's also useful for support purposes and answering a common question about the application version.

For more information about version numbers, see Version numbers in Business Central.

Change the application version in the database

  1. Run the Set-NAVApplication cmdlet:

    Set-NAVApplication -ServerInstance $NewBcServerInstance -ApplicationVersion $NewBCVersion -Force
    

    For example:

    Set-NAVApplication -ServerInstance BC210 -ApplicationVersion 21.0.38071.0 -Force
    
  2. Run the Sync-NAVTenant cmdlet to synchronize the tenant with the application database.

    Sync-NAVTenant -ServerInstance $NewBcServerInstance -Mode Sync -Tenant $TenantId
    

    With a single-tenant deployment, you can omit the -Tenant parameter and value.

  3. Run the Start-NavDataUpgrade cmdlet to change the version number:

    Start-NAVDataUpgrade -ServerInstance $NewBcServerInstance -FunctionExecutionMode Serial -Tenant $TenantId
    

    The data upgrade process will be running in the background after running the above Start-NAVDataUpgrade cmdlet. You check on the progress using the Get-NAVDataUpgrade cmdlet: such as: Get-NAVDataUpgrade -ServerInstance $NewBcServerInstance -Tenant $TenantId -Progress or Get-NAVDataUpgrade -ServerInstance $NewBcServerInstance -Tenant $TenantId -Detailed.

Don't stop the Business Central Server instance until the process is complete, that is, when you see State = Completed in the results from the Get-NAVDataUpgrade cmdlet. Also, you can't do operations like installing extensions until the state is operational. It can take several minutes before the process completes.

Change the application version shown on the Help and Support page in the client

The Business Central Server includes a configuration setting called Solution Version Extension (SolutionVersionExtension). This setting lets you specify an extension whose version number will show as the Application Version on the client's Help and Support page. Typically, you'd use the extension considered to be your solution's base application. You set Solution Version Extension to ID of the extension. For example, if your solution uses the Microsoft Base Application, set the value to 437dbf0e-84ff-417a-965d-ed2bb9650972.

You can set Solution Version Extension by using the Business Central Server Administration tool or the Set-NAVServerConfiguration cmdlet of the Business Central Administration Shell.

The following example uses the Set-NAVServerConfiguration cmdlet to set the Solution Version Extension to the Microsoft Base Application:

Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName SolutionVersionExtension -KeyValue "437dbf0e-84ff-417a-965d-ed2bb9650972" -ApplyTo All  

Post-upgrade tasks

  1. IMPORTANT If you have a two- or three-tiered deployment and the Business Central Web Server and Business Central Server are on different computers, reconfigure delegation according to Configuring Delegation for Business Central Web Server.

  2. Enable task scheduler on the server instance.

  3. (Multitenant only) For tenants other than the tenant that you use for administration purposes, if you mounted the tenants using the -AllowAppDatabaseWrite parameter, dismount the tenants, then mount them again without using the -AllowAppDatabaseWrite parameter.

  4. If you want to use data encryption as before, enable it.

    For more information, see Managing Encryption and Encryption Keys.

    Optionally, if you exported the encryption key instead of disabling encryption earlier, import the encryption key file to enable encryption.

  5. Grant users permission to the Open in Excel and Edit in Excel actions.

    Version 18 introduced a system permission that protects these two actions. The permission is granted by the system object 6110 Allow Action Export To Excel. Because of this change, users who had permission to these actions before upgrading, will lose permission. To grant permission again, do one of the following steps:

    • Assign the EXCEL EXPORT ACTION permission set to appropriate users.
    • Add the system object 6110 Allow Action Export To Excel permission directly to appropriate permission sets.

    For more information about working with permission sets and permissions, see Export and Import Permission Sets.

  6. Complete the setup of the integration with Dynamics 365 Sales.

    If your Business Central on-premises deployment had an active connection with Dynamics 365 Sales, you must perform the following steps to complete the setup of the connection in Business Central online:

    • Open the Microsoft Dynamics 365 Connection Setup page.

    • To upgrade the connection to use certificate-based authentication, choose Connection, and then choose the Use Certificate Authentication action.

    • Sign in with the administrator credentials for the connected Dynamics 365 Sales organization. Signing in and the subsequent setup of the certificate authentication should take less than a minute.

      Note

      This is a required step. For more information, see Upgrade Connections from Business Central Online to Use Certificate-Based Authentication in the business functionality content.

    • Once the setup of certificate authentication is done, choose Cloud Migration, and then choose Rebuild Coupling Table.

      This will schedule the rebuilding of the coupling table and will open the corresponding job queue entry, so you can monitor its progress and restart it if it ends up in error state.

      Note

      The step for rebuilding the coupling table is not needed if you have performed cloud migration from Business Central version 15 or later.

See also

Publishing and Installing an Extension
Upgrading to Business Central
Upgrading Extensions