Issue

The Vault thin client link generated by the powerFLC functions is incorrect for Vault 2022. 


Cause

In Vault 2022 the format for the thin client link changed so the function generates an incorrect link.


Solution

To resolve this issue and get correct links for the Vault 2022 thin client you can adapt the function that creates the link.

To do so follow these steps:

  1. Open the file "C:\ProgramData\coolOrange\powerJobs\Modules\coolOrange.powerFLC.Workflows.MappingFunctions.psm1"
  2. Search for the function "GetVaultThinClientLink"
  3. Replace the function with the following code:
  4. function GetVaultThinClientLink($entity) {
        if ($entity._EntityTypeID -eq "ITEM") { 
            $f = "items"
            $e = "item"
        } elseif ($entity._EntityTypeID -eq "FILE") {
            $f = "explore"
            $e = "file"
        } elseif ($entity._EntityTypeID -eq "CO") {
            $f = "changeorders"
            $e = "changeorder"
        } else {
            return ""
        }
     
        $serverUri = New-Object Uri -ArgumentList $vault.InformationService.Url
        $hostname = $serverUri.Host
        if ($hostname -ieq "localhost") { $hostname = [System.Net.Dns]::GetHostName() }
        return "$($serverUri.Scheme)://$($hostname)/AutodeskTC/$($vaultConnection.Vault)/$($f)/$($e)/$($entity.MasterId)"
    }