Does anyone know where you can find logging for an upgrade codeunit?

EffveloEffvelo Member Posts: 1
I would like to know if my upgrade codeunit and the steps I created in that codeunit have run (successfully)

Answers

  • vaprogvaprog Member Posts: 1,139
    Hi Effvelo

    Run the upgrade from PowerShell. Then after the upgrade is finished (or even, while it is still in progress) you can query the reslut. Save it to a variable. Then you can inspect it.
    $s = Get-NAVDataUpgrade -ServerInstance <InstanceName>
    
    The following gives you the usual output of the command
    $s
    
    but there's more. Some ideas
    # filter for job with Error or InProgress
    $s.executionDetails | Where {$_.State -ne "Pending" -and $_.State -ne "Completed"}
    
    # export to tab-separated file
    $s.executionDetails | export-csv -delimiter "`t" -path theOutFile.txt -notype
    
    # export to csv
    $s.executionDetails | export-csv -path 'DataUpgrade_executionDetails.csv' -NoType -Encoding default
    
Sign In or Register to comment.