Modifier

Partager via


Installing a Business Central 2022 Release Wave 1 Update

This article describes how to install an update for Business Central on-premises. An update is a set of files that includes all hotfixes and regulatory features that have been released for Business Central.

You can choose to update only the platform or both the platform and application code. The installation guidelines are separated into PLATFORM tasks and APPLICATION tasks.

Overview

The following figure provides a high-level representation of a Business Central solution and the components that are involved in the installation of an update.

Business Central application stack.

The databases store the application metadata and business data. If you have a single-tenant deployment, this data is stored in a single database. A multitenant deployment stores the application metadata in the application database and the business data in one or more tenant databases.

Application stack

The application includes AL extensions that define the objects and code that makes up the business logic. For example, objects include tables, report, pages, codeunits, and more. Each extension is compiled and delivered as an .app file, which is published to the Business Central Server instance.

  • System Application extension

    The Microsoft System Application extension includes functionality that isn't directly related the business logic. For more information, see Overview of the System Application. When using the Microsoft Base Application, your solution uses the System Application. With a custom Base Application, your solution may or may not use the System Application. If it doesn't, you can skip any steps in this article related to the System Application.

  • Base application extension

    As a minimum, the solution always includes the Base Application. The Base Application contains the objects (such as table, pages, codeunits, and reports) that define the business logic and functionality of the solution. The Base Application can be either the Microsoft Base Application or a customized Base Application. The Microsoft Base Application is the standard application that is on the installation media (DVD). A customized Base Application is an application that includes customized code.

  • Application extension

    The Application extension logically encapsulates all of the extensions making up a solution, for example, version 20.0.0.0 of the base and system application package files, and it provides a convenient way to define and refer to this solution identity. This extension is required for Microsoft extensions, but is optional for third-party extensions. For more information, see The Microsoft_Application.app File.

  • Customization extensions

    Customization extensions add functionality and features to the Base Application or System Application. Extensions can be either Microsoft extensions or third-party extensions. Microsoft extensions are available on the DVD. Third-party extensions are extensions developed by your organization or by another organization, like an ISV.

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.

Business Central server and web server instances

The steps in this article will delete the default Business Central Server and Business Central Web Server of the old version. The default instances are those instances that were created using the Business Central Setup (setup.exe) program. A new Business Central Server and Business Central Web Server instance that run on the new platform will be added to replace the old ones.

Your current deployment, however, may using multiple Business Central Server or Business Central Web Server instances. If so, you might need to do some extra tasks at the end of the process for each instance:

  • With Business Central Server instances, all extra instances, like the new default instance, will automatically use new platform assemblies and file installed by the setup program. The only task you might have to do on the extra instances is to modify some configuration file settings (.config).

  • Extra Business Central Web Server instances aren't upgraded automatically. With these instances, you'll have to remove the old instances, then create new instances using the latest platform.

Platform versus application update

A platform update doesn't change the application. It involves converting your databases to the new platform and recompiling the existing extensions to ensure that they're compatible with the new platform.

An application update involves:

  • Publishing new versions of extensions that include the latest application modifications
  • Synchronizing the databases with any schema change introduced by the new extensions
  • Updating affected data.

The installation media (DVD) includes new versions of Microsoft's Base Application, System Application, and extensions. The DVD also includes the AL source code for the Microsoft Base Application. This code useful if you have a custom base application. You can use the code to compare and merge updates into your application. You'll only have to recompile third-party extensions that you don't have a new version to publish.

PREPARATION

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.

$BcServerInstance = "The name of the Business Central server instance, for example: BC200"
$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 (20-0)" 
$ApplicationDatabase = "The name of the Business Central application database in a multitenant environment, for example: My BC App DB." 
$DatabaseServer= "The SQL Server instance that hosts the databases. The value has the format server_name\instance_name, For example: localhost\BCDEMO"
$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"
$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"
$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 update, for example: 20.1.39901.0"
$ExtPath = "The path and file name to an extension package" 
$ExtName = "The name of an extension"
$ExtVersion = "The version of an extension, for example, 1.0.0.0"
$AddinsFolder = "The file path to the Add-ins folder of Business Central Server installation, for example: C:\Program Files\Microsoft Dynamics 365 Business Central\200\Service\Add-ins"
$PartnerLicense= "The file path and name of the partner license"
$CustomerLicense= "The file path and name of the customer license"

Download update package

The first thing to do is to download the update package that matches your Business Central solution.

  1. Go to the list of available updates for your on-premises version of Business Central. Then, choose the update that you want.

  2. From the update page, under the Resolution section, select the link for downloading the update, and follow the instructions.

  3. On the computer where you downloaded the update .zip file, extract the all the files to a selected location.

    When extracted, the update includes the DVD folder. This folder contains the full Business Central product. For example, the folder includes the Business Central installation program (setup.exe), tools for upgrading to the platform, and the Microsoft extensions.

When this step is completed, you can continue to update your Business Central solution to the new platform and application.

Save copies of server configuration files

It's a good idea to save copies of the configuration files for the Business Central Server instance (CustomSettings.config) and Business Central Web Server instances (navsettings.json and web.config). Having copies will help you configure the components after upgrade to match the setup you had before upgrade.

  • For the Business Central Server instance, the default location of the CustomSettings.config file is C:\Program Files\Microsoft Dynamics 365 Business Central\NNN\Service.

  • For the Business Central Web Server instances, the navsettings.json file is in the physical path of the web server instance. By default, the path is C:\inetpub\wwwroot\[WebServerInstanceName] on the computer's hard drive. [WebServerInstanceName] corresponds to the name (alias) of the web server instance in IIS, for example, C:\inetpub\wwwroot\BCNNN]. The web.config file that is located in the physical path of the web application for the Business Central Web client. The path is rootdrive\inetpub\wwwroot\[VirtualDirectoryName]\. For example, the folder for the default Business Central Web client application is C:\inetpub\wwwroot\BCNNN\.

    BCNNN indicates the name of the Business Central Server instance chosen during setup.

Prepare existing databases

  1. Back up your databases.

  2. Run the Business Central Administration Shell as an administrator.

  3. (Single-tenant only) Uninstall all extensions from the all tenants.

    In this step, you uninstall the Base Application, System Application (if used), and any other 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 $BcServerInstance
      
    2. Uninstall the extensions.

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

      Uninstall-NAVApp -ServerInstance $BcServerInstance -Tenant $TenantId -Name <extensions name> -Version $ExtVersion -Force
      

      Replace $ExtName and $ExtVersion with the exact name and version the installed extension. For single-tenant deployment, set $TenantId to default or omit the -Tenant parameter.

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

      Get-NAVAppInfo -ServerInstance $BcServerInstance -Tenant $TenantId | % { Uninstall-NAVApp -ServerInstance $BcServerInstance -Tenant $TenantId -Name $_.Name -Version $_.Version -Force}
      
  4. Unpublish the existing system symbols.

    To unpublish the system symbols, use the Unpublish-NAVApp cmdlet as follows:

    Unpublish-NAVApp -ServerInstance $BcServerInstance -Name System
    

    What are symbols?.

  5. (Multitenant only) Dismount the tenants from the application database.

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

    Dismount-NAVTenant -ServerInstance $BcServerInstance -Tenant $TenantId
    

Install Business Central components

From the installation media (DVD), run setup.exe to uninstall the current Business Central components and install the Business Central components included in the update.

  1. Stop the Business Central Server instance.

    Stop-NAVServerInstance -ServerInstance $BcServerInstance
    
  2. Run setup.exe to uninstall your current version of Business Central.

  3. Run setup.exe again to install components of the update.

    1. Follow setup pages until you get to the Microsoft Dynamics 365 Business Central Setup page.

    2. Select Advanced installation options > Choose an installation option > Custom.

    3. On the Customize the installation page, select the following components as a minimum:

      • AL Development Environment (optional but recommended)

      • Server

      • Web Server Components.

        Note

        When install the Web Server Components, a Business Central Web Server instance with the same name that you define for the Business Central Server instance will be created on Internet Information Services (IIS). If you're existing deployment has multiple web server instances that you want to reuse, you'll have to upgrade these instances later in this article.

    4. Select Next.

    5. On the Specify parameters page, set the fields as needed.

      Important

      Clear the SQL Database field so that it is blank. At this time, do not set this to the database that you want to update; otherwise, the installation of the Business Central Server will fail. You will connect the database to the Business Central Server later after it is converted to the new platform.

    6. Select Apply to complete the installation.

For more information, see Installing Business Central Using Setup.

PLATFORM UPDATE

Follow the next few tasks to convert your database to the new platform of the update. A multitenant deployment includes the application and tenant databases. Running the database conversion will:

  • Update the system tables of the database to the new schema (data structure)
  • Provide the latest platform features and performance enhancements
  • Automatically publish the system symbols for the new platform

Also, to ensure that the existing published extensions work on the new platform, you'll recompile the extensions.

Convert existing database to new platform

  1. Run the Business Central Administration Shell as an administrator.

    For more information, see Run Business Central Administration Shell.

  2. Run the Invoke-NAVApplicationDatabaseConversion cmdlet to start the database conversion to the new platform.

    Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $TenantDatabase|$ApplicationDatabase -Force
    

    For example, in a single tenant deployment:

    Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $TenantDatabase -Force
    

    In a multitenant deployment, run this cmdlet against the application database. For example:

    Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase -Force
    

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

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

    Note

    Depending on the update that you're installing, you might get a message similar to the following:

    Invoke-NAVApplicationDatabaseConversion : A technical upgrade of database <database name> on server '.\<database instance>' cannot be run, because the database's application version 'NNNNNN' is greater than or equal to the platform version 'NNNNNN'

    This isn't an error. This message is recorded as a warning in the event log as well. This message indicates that the application database is already compatible with the new platform, which happens when the update does not make any schema changes to the system tables.

    You'll see this message if you ran the cmdlet without the -Force parameter. Run the cmdlet again, but be sure to include -Force parameter.

Connect server instance to database

  1. (Multitenant only) Enable the server instance as a multitenant instance:

    Set-NAVServerConfiguration -ServerInstance $BcServerInstance -KeyName Multitenant -KeyValue true
    
  2. Connect the server instance to connect to the database.

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

    In a multitenant deployment, the database is the application database. For more information, see Connecting a Server Instance to a Database.

  3. Restart the server instance.

    Restart-NAVServerInstance -ServerInstance $BcServerInstance
    

Import Business Central partner license

To import the license, use the Import-NAVServerLicense cmdlet. You'll have to restart the server instance afterwards:

Import-NAVServerLicense -ServerInstance $BcServerInstance -LicenseFile $PartnerLicense
Restart-NAVServerInstance -ServerInstance $BcServerInstance

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

Recompile published extensions

Compile all published extensions against the new platform.

Note

If you plan on updating the application you can skip this step for extensions for which you have new versions built on the new platform. For example, this includes Microsoft extensions that are on the DVD.

  1. To compile an extension, use the Repair-NAVApp cmdlet, For example:

    Repair-NAVApp -ServerInstance $BcServerInstance -Name $ExtName -Version $ExtVersion
    

    To compile all published extensions at once, you can use this command:

    Get-NAVAppInfo -ServerInstance $BcServerInstance | Repair-NAVApp  
    
  2. Restart the server instance.

    Restart-NAVServerInstance -ServerInstance $BcServerInstance
    

Synchronize tenant

  1. (Multitenant only) Mount the tenant to the new Business Central Server instance.

    You'll have to do this step and the next for each tenant. For more information, see Mount or Dismount a Tenant.

    Mount-NAVTenant -ServerInstance $BCServerInstanceName -DatabaseName $TenantDatabase -Tenant $TenantId 
    
  2. Synchronize the tenant.

    Use the Sync-NAVTenant cmdlet:

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

    For a single-tenant deployment, you can either set the $TenantId to default or omit the -Tenant $TenantId parameter. For more information about syncing, see Synchronizing the Tenant Database and Application Database.

Note

At this point, if you want to update the application, you can skip the next step and proceed APPLICATION.

(Single-tenant only) Reinstall extensions

In this task, you reinstall the same extensions that were installed on the tenant before. If you're planning on updating the application, then skip this step.

To install an extension, you use the Install-NAVApp cmdlet.

  1. If your solution uses the System Application, install this first.

    Install-NAVApp -ServerInstance $BcServerInstance -Name "System Application" -Version $ExtVersion
    

    Replace $ExtVersion with the exact version of the published System Application.

  2. Install the Base Application.

    Install-NAVApp -ServerInstance $BcServerInstance -Name "Base Application" -Version $ExtVersion
    

    Replace $ExtVersion with the exact version of the published Base Application.

  3. Install the Application extension as needed.

    Install-NAVApp -ServerInstance $BcServerInstance -Name "Application" -Version $ExtVersion
    

    Replace $ExtVersion with the exact version of the published Application extension.

  4. Install other extensions, including Microsoft and third-party extensions.

    Install-NAVApp -ServerInstance $BcServerInstance -Name $ExtName -Version $ExtVersion
    

At this point, your solution has been updated to the latest platform.

Important

If your solution uses any Microsoft control add-ins, you must upgrade the add-ins to the latest version. Go to Upgrade control add-ins under Post Upgrade section.

APPLICATION UPDATE

Follow the next tasks to update the application code to the new features and hotfixes. The tasks include publishing new versions of the System Application, Base Application, and add-on extensions.

You publish the System Application extension only if it was used in old solution. Add-on extensions include Microsoft and third- party extensions that were used in the old solution.

Upgrade System Application

Follow these steps if your existing solution uses the Microsoft System Application. Otherwise, you can skip this procedure.

  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 $BcServerInstance -Path "<path to Microsoft_System Application.app>"
    
  2. Synchronize the tenant(s) with the System Application extension (Microsoft_System Application):

    Use the Sync-NAVApp cmdlet:

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

    Replace $NewBcVersion with the exact version of the published System Application.

    Tip

    To get a list of all published extensions, along with their names and versions, use the Get-NAVAppInfo cmdlet.

  3. Run the data upgrade on the System Application.

    To run the data upgrade, use the Start-NavAppDataUpgrade cmdlet:

    Start-NAVAppDataUpgrade -ServerInstance $BcServerInstance -Tenant $TenantId -Name "System Application" -Version $NewBcVersion
    

    Upgrading data updates the data in the tables of the tenant database to the schema changes made to tables of the System Application.

Upgrade Base Application

Microsoft Base Application

Follow these steps if your existing solution uses the Microsoft Base Application.

  1. 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 $BcServerInstance -Path "<path to Microsoft_Base Application.app>"
    
  2. Synchronize the tenant with the Business Central Base Application extension (Microsoft_BaseApp):

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

    Replace $NewBcVersion with the exact version of the published Base Application.

    With this step, the base app takes ownership of the database tables. When completed, in SQL Server, the table names will be suffixed with the base app extension ID. This process can take several minutes.

  3. Run the data upgrade on the Base Application.

    To run the data upgrade, use the Start-NavAppDataUpgrade cmdlet:

    Start-NAVAppDataUpgrade -ServerInstance $BcServerInstance -Tenant $TenantId -Name "Base Application" -Version $NewBcVersion
    

    Upgrading data updates the data in the tables of the tenant database to the schema changes made to tables of the Base Application.

Upgrade custom Base Application

With a custom Base Application, you may want the new application features and hotfixes in the Microsoft Base Application. If so, you'll have to merge the modifications made in the Microsoft Base Application into your custom Base Application. Then, create a new version of your custom Base Application.

The source code for the new Microsoft Base Application version is in the Base Application.Source.zip file. This file is on the installation media (DVD), in the Applications\BaseApp\Source folder. You can compare this source code with the source code of the previous Microsoft Base Application and your custom application source. Then merge the code into a new custom application version.

After you've created the new version of your custom application, you publish it to the application server instance. Then, you synchronize and run the data upgrade on the tenants.

Upgrade Microsoft extensions

If your old solution used Microsoft extensions, then you upgrade these extensions to the new versions that are available on the Business Central installation media (DVD). The new versions are in the Applications folder, which contains a subfolder for each extension. The extension package (.app file) that you need for publishing the extension is in the Source folder, for example, Applications\SalesAndInventoryForecast\Source\SalesAndInventoryForecast.app.

The general steps for this task are listed below. For detailed steps, see Publishing, Upgrading, and Installing Extensions During Upgrade.

Publish and install Microsoft_Application extension

The Microsoft_Application extension was introduced in 15.3. In short, it's used to contain the dependency declarations on the system and base application extensions. For more information about this extension, see The Microsoft_Application.app File.

  1. Publish the Microsoft_Application.app package.

    The installation media path to the extension package (.app file) is Applications\Application\Source\Microsoft_Application.app"

    Publish-NAVApp -ServerInstance $BcServerInstance -Path "<folder path>\Microsoft_Application.app"
    
  2. Synchronize the tenant database with the schema changes of the Microsoft_Application extension.

    Sync-NavApp -ServerInstance $BcServerInstance -Tenant $TenantId -Name Application -Version $NewBcVersion
    
  3. Upgrade the Microsoft_Application extension on your tenants.

    Start-NAVAppDataUpgrade -ServerInstance $BcServerInstance -Tenant $TenantId -Name Application 
    

Publish and install Microsoft extensions

Complete these steps for each Microsoft extension that you want to upgrade.

  1. Publish the new extension versions from the installation media (DVD).

    Publish-NAVApp -ServerInstance $BcServerInstance -Path $ExtPath
    
  2. Synchronize the tenant database with the schema changes of the extensions.

    Sync-NavApp -ServerInstance $BcServerInstance -Tenant $TenantId -Name $ExtName -Version $NewBcVersion
    
  3. Upgrade the data associated with the Microsoft extensions. This step will automatically install the new version on the tenant

    Start-NAVAppDataUpgrade -ServerInstance $BcServerInstance -Tenant $TenantId -Name $ExtName -Version $NewBcVersion
    

Upgrade Third-Party extensions

If the old solution used third-party extensions, and you still want to use them, they must be compiled to work on the new platform. For more information, see Recompile published extensions. You then reinstall the extensions on tenants using the Install-NAVApp cmdlet.

As an alternative, if you have the source for these extensions, you can build and compile a new version of the extension in the AL development environment. Then, you upgrade to the new version as described in the previous task.

Post Upgrade

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')

Update 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  

For more information about how to configure a server instance, see Configuring Business Central Server.

Import the customer license

Import the customer license by using the Import-NAVServerLicense cmdlet, as you did with the partner license. You'll have to restart the server instance afterwards.

Import-NAVServerLicense -ServerInstance $BcServerInstance -LicenseFile $CustomerLicense
Restart-NAVServerInstance -ServerInstance $BcServerInstance

Upgrade other web server instances

At this point, the only Business Central Web Server instance that's been upgraded to the new version is the one you installed earlier using the setup.exe file. If you had multiple web server instances running on the old version that you still want multiple instances, complete the following steps:

  1. Save a copy of the navsettings.json and web.config file.

  2. Run the Remove-NAVWebserverInstance cmdlet to delete the instance. For example:

    Remove-NAVWebServerInstance -WebServerInstance MyWebServerInstance
    

Replace MyWebServerInstancewith the name of the instance you want to remove.

  1. Run the New-NAVWebserverInstance cmdlet to create a new instance.

    For example, the following command creates a subsite instance named MyWebServerInstance under the default container Microsoft Dynamics 365 Business Central Web Client on port 8081.

    New-NAVWebServerInstance -WebServerInstance MyWebServerInstance -Server localhost -ServerInstance $BcServerInstance -SiteDeploymentType SubSite -ContainerSiteName "Microsoft Dynamics 365 Business Central Web Client" -WebSitePort 8081 -PublishFolder "C:\Program Files\Microsoft Dynamics 365 Business Central\BCNNN\Web Client"
    

    The -PublishFolder parameter specifies the path to the Business Central Web Server components for the version. If you're working on a computer where the Business Central Web Server components are installed, you don't have to set the -PublishFolder parameter.

For more information about multiple web server instances, see Setting Up Multiple Business Central Web Server Instances.

See Also

Dynamics 365 Business Central On-Premises 2022 Release Wave 1 Updates
Upgrading to Dynamics 365 Business Central 2019 Release Wave 2
Synchronizing the Tenant Database and Application Database
Version numbers in Business Central
Publish and Install an Extension
Getting Started in AL
Version numbers in Business Central