How to do it...

  1. Open the PowerShell ISE in administrator mode and create a new script file.
  2. Add the following code:
$appFile = '<pathToAppFile>'
$appName = 'ALProject1'
$appVersion = '1.1.0.0'
$serverInstanceName = '<yourServerInstanceName>'
$rtcPath = "C:Program Files (x86)Microsoft Dynamics 365 Business Central*RoleTailored Client"

Import-Module $(Join-Path $rtcPath 'Microsoft.Dynamics.Nav.Apps.Management.psd1') -DisableNameChecking -Force

Publish-NAVApp -ServerInstance $serverInstanceName -Path $appFile -PackageType Extension -SkipVerification
Sync-NavApp -ServerInstance $serverInstanceName -Name $appName -Version $appVersion -Tenant Default
Start-NAVAppDataUpgrade -ServerInstance $serverInstanceName -Name $appName -Version $appVersion

Make sure that you set the correct values for these variables:

  • appFile: The full file path to Default publisher_ALProject1_1.1.0.0.app, which you previously downloaded
  • serverInstanceName: The Business Central service tier name (for example, BC140) that is connected to your sandbox
  1. Save the script as UpgradeApp.ps1 and run it.
The script will perform the three steps necessary to install a Business Central application: publish, sync, and upgrade.

When the upgrade command is executed, any upgrade logic that is coded into the application will be executed.
  1. Log in to your sandbox and verify that the ALProject1 application is installed and has been upgraded to version 1.1.0.0.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.202.187