AFAdmin.EnablePropagationOfTargetDeletion Method
- Last UpdatedNov 18, 2025
- 3 minute read
- PI System
- AF SDK 2024 R2
- Developer
Enables support for propagating the deletion of targets (elements) to the referencing analyses and notifications.
Namespace: OSIsoft.AF.Diagnostics
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public static void EnablePropagationOfTargetDeletion( PISystem system, bool enable )
Public Shared Sub EnablePropagationOfTargetDeletion ( system As PISystem, enable As Boolean ) Dim system As PISystem Dim enable As Boolean AFAdmin.EnablePropagationOfTargetDeletion(system, enable)
public: static void EnablePropagationOfTargetDeletion( PISystem^ system, bool enable )
static member EnablePropagationOfTargetDeletion : system : PISystem * enable : bool -> unit
Parameters
- system
- Type: OSIsoft.AFPISystem
The operation will be performed on the specified PISystem. - enable
- Type: SystemBoolean
Specify to enable the propagation of target deletions; otherwise specify to disable this feature.
Exceptions
| Exception | Condition |
|---|---|
| SecurityException | This exception is thrown when attempting to execute without Admin security rights. |
| ArgumentNullException | This exception is thrown when attempting to execute on a PISystem that is null or deleted. |
| NotSupportedException | This exception is thrown when attempting to execute on a PISystem that does not support the AdminFunctionality feature. |
Remarks
This method is used to enable or disable the EnablePropagationOfTargetDeletion feature in the PI AF SQL Server database. When this feature is enabled, the deletion of an AFElementTemplate will delete any AFAnalysisTemplate or AFNotificationTemplate that targets the element template. Also when enabled, the deletion of an AFElement will delete any AFAnalysis or AFNotification that targets the element.
Use the PISystem.Supports method to check if the PISystem supports the AdminFunctionality feature.
| Requires the Admin right to execute. |
| This method will error on servers before AF 2018 R2 (2.10.5). |