- 14 Oct 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Run uploaded script
- Updated on 14 Oct 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Filter applied to a package
The following PowerShell script determines if the current day of the week is a weekday (Monday through Friday) and, based on that, controls whether the application is visible in the Liquit Workspace. If it is the weekend (Saturday or Sunday), the application should be hidden.
In Liquit Workspace, open the Salesforce package and navigate to Releases > Filters
Create a new filter and in the General tab configure the following:
- In Type, select Run uploaded filter script.
- In Script engine, select Windows Powershell.
- In Script, insert the following:
$day = (Get-Date).DayOfWeek if ($day -ne "Saturday" -or $day -ne "Sunday") { return $true } else { return $false }
- In Evaluate, select Value.
- In Compare, select Equal.
- In Output, write True.
Filter applied to a package action set
The following PowerShell script ensures that a self-signed certificate required by an MSIX application is installed. If the certificate is missing, install it first, and then proceed with installing the MSIX application. After installing it will launch the MSIX application.
In Liquit Workspace, open a package and navigate to Releases > Actions
Open the Install action and navigate to Filters tab.
Click Create filter set, click Create filter and in the General tab configure the following:
- In Type, select Run uploaded filter script.
- In Script engine, select Windows Powershell.
- In Script, insert the following:
if (Get-ChildItem -Path Cert:\LocalMachine\TrustedPeople | Where-Object {$_.Thumbprint -eq "A03D24020307E42A2F046940C69929579218D802"}) { return $true } else { return $false }
- In Evaluate, select Value.
- In Compare, select Equal.
- In Output, write False.