I am running upgrade to V17 according to this MS guideline
Upgrading Customized C/AL Application to Microsoft Base Application Version 17 .
Everything is fine but...
Task 10 point 1 when I run Start-NavDataUpgrade is asynchronous
In next point they say:
"To view the progress of the data upgrade, you can run Get-NavDataUpgrade cmdlet with the –Progress switch. When completed, the table migration extension will be installed."
I want this to be scripted - not manual...
I tried using SingleTransaction option - but it is also asynchronous.
Should I build some weird repeat/try/sleep loop - or is there a better way to do this?
Answers
$ServerReady = $false
Do
{
try
{
$ServerReady = $true
Install-NAVApp -ServerInstance BC17 -Name "System Application" -Version 14.0.0.0
}
catch
{
$ServerReady = $false
Start-Sleep -Seconds 60
}
}
Until($ServerReady)
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/
Get-NAVDataUpgrade -ServerInstance BC140 -Progress -Interval 30
$notifyParams = @{title="PowerShell Alert";content="NavDataUpgrade Ready."}
Invoke-WebRequest -Uri https://hook.notify17.net/api/raw/asdf -Method POST -Body $notifyParams
I scripted it this way so I got warned by notify17 app at the end of the process. You can do this for every step in your script (replace asdf with your notify17 key).
I missed this completely
Thanks!
if I have something like this:
Line1: Start-NavDataUpgrade -ServerInstance BC140 -FunctionExecutionMode Serial
Line2: Get-NAVDataUpgrade -ServerInstance BC140 -Progress -Interval 30
Line3: whatever
Line 3 is executed right away - without waiting for completion
Below is my script (using standard approach for upgrade scripts) and its result:
My previous version works fine...