Skip to main content
Business Central forum
Unanswered

Upgrading Business Central Invoke Error

editSubscribe (0) ShareShare
ReportReport
Posted on by UG Leader

I am new to this and have been given the task of updating Business Central from v19 to v20. I was able to do it through the Microsoft docs, but the task I have now is to create a whole script from beginning to end so it can be run at once without doing it step by step. When I am at the Invoke-NavApplicationDatabaseConversion command and run it I get this error:

Invoke-NAVApplicationDatabaseConversion : A technical upgrade of database 'Demo Database BC (19-0)' on server
'LOCALHOST\BCDEMO' cannot be run, because the database�s application version '131112' is greater than or equal to the
platform version '131112'.

Does anyone know why this is happening and how to fix it? 

Here is my entire script if it helps:

Import-Module "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\NavAdminTool.ps1"



$OldBcServerInstance = "BC190"
$NewBcServerInstance = "BC200"
$ApplicationDatabase = "Demo Database BC (19-0)" 
$DatabaseServer = "localhost\BCDEMO"
$SystemAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\system application\source\Microsoft_System Application.app"
$BaseAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\BaseApp\Source\Microsoft_Base Application.app"
$ApplicationAppPath = "C:\BBS\cu2\Dynamics.365.BC.38230.US.DVD (1)\Applications\Application\Source\Microsoft_Application.app"
$NewBCVersion = "20.0.37253.38230"
$PartnerLicense = "C:\BBS\5317559_BC20\5317559.flf"
$CustomerLicense = "The file path and name of the customer license"
$AddinsFolder = "C:\Program Files\Microsoft Dynamics 365 Business Central\190\Service\Add-ins\"



Invoke-NAVApplicationDatabaseConversion -DatabaseServer $DatabaseServer -DatabaseName $ApplicationDatabase
Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName DatabaseName -KeyValue $ApplicationDatabase
Set-NavServerConfiguration -ServerInstance $NewBcServerInstance -KeyName "EnableTaskScheduler" -KeyValue false
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Import-NAVServerLicense -ServerInstance $NewBcServerInstance -LicenseFile $PartnerLicense
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $SystemAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $BaseAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path $ApplicationAppPath
Publish-NAVApp -ServerInstance $NewBcServerInstance -Path "C:\projects\LoanVisionLite\Bestborn Business Solutions, LLC_LoanVisionLite_1.0.0.0.app" -SkipVerification
Get-NAVAppInfo -ServerInstance $NewBcServerInstance | Where-Object {$_.Publisher -notlike 'Microsoft'} | Repair-NAVApp
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "System Application" -Version $NewBCVersion
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "Base Application" -Version $NewBCVersion
Start-NAVAppDataUpgrade -ServerInstance $NewBcServerInstance -Name "Application" -Version $NewBCVersion

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.SocialListening' -PublicKeyToken 31bf3856ad364e35 -ResourceFile ($AppName = Join-Path $AddinsFolder 'SocialListening\Microsoft.Dynamics.Nav.Client.SocialListening.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')

Set-NAVApplication -ServerInstance $NewBcServerInstance -ApplicationVersion $NewBCVersion -Force
Start-NAVDataUpgrade -ServerInstance $NewBcServerInstance -FunctionExecutionMode Serial
Set-NAVServerConfiguration -ServerInstance $NewBcServerInstance -KeyName SolutionVersionExtension -KeyValue "437dbf0e-84ff-417a-965d-ed2bb9650972" -ApplyTo All
Restart-NAVServerInstance -ServerInstance $NewBcServerInstance

Categories:
Attachments

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,080 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,601 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans