FrameworkTemplate/SolutionTemplate/Scripts/PreAction.ps1
<#
.SYNOPSIS Executes pre-deployment actions before a solution is imported into the target environment. .DESCRIPTION This script runs automatically after the solution is packed but before it is imported/deployed. Use this to perform pre-deployment operations like environment setup or data preparation. .PARAMETER Conn The connection object to the Dataverse environment. .PARAMETER EnvironmentName The name of the target environment where the solution will be deployed. .PARAMETER Path The file path to the solution package. #> Param( [System.Object] [Parameter(Mandatory = $true)] $Conn, [string] [Parameter(Mandatory = $true)] $EnvironmentName, [string] [Parameter(Mandatory = $true)] $Path ) $ProgressPreference = 'SilentlyContinue' . (Join-Path $PSScriptRoot "DeploymentFunctions.ps1") Write-Host "Executing Pre Action for environment: $EnvironmentName" Write-Host "Solution Path: $Path" # Add your custom pre-deployment logic here |