PDF is created for the wrong file version

Issue

When using the synchronize properties job the revision table in the PDF is wrong.

Cause

The synchronize property job creates a new file iteration but the PDF job is taking the latest file iteration.

Solution

In the Setup_Job.ps1 script you can see, that the latest version of the file is used. 

If you prefer to get the exact version of the file, on which you triggered the job, please change following lines in the Setup_Job.ps1:

$fileWithCorrectVersion = (Get-VaultFile -FileId $entityId)
$global:file = Get-VaultFile -FileId $fileWithCorrectVersion.MasterId
to:
$global:file = Get-VaultFile -FileId $entityId