Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFNotificationRule.SetStatus Method (IList(AFNotificationRule), AFStatus)

AFNotificationRule.SetStatus Method (IList(AFNotificationRule), AFStatus)

  • Last UpdatedNov 18, 2025
  • 3 minute read
AFNotificationRule.SetStatus Method (IList(AFNotificationRule), AFStatus)
Set the AFNotificationRule status.
Set the list of AFNotificationRule to the specified status.

Namespace:  OSIsoft.AF.Notification
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

public static AFErrors<AFNotificationRule> SetStatus(
	IList<AFNotificationRule> notificationRules,
	AFStatus newStatus
)
Public Shared Function SetStatus ( 
	notificationRules As IList(Of AFNotificationRule),
	newStatus As AFStatus
) As AFErrors(Of AFNotificationRule)

Dim notificationRules As IList(Of AFNotificationRule)
Dim newStatus As AFStatus
Dim returnValue As AFErrors(Of AFNotificationRule)

returnValue = AFNotificationRule.SetStatus(notificationRules, 
	newStatus)
public:
static AFErrors<AFNotificationRule^>^ SetStatus(
	IList<AFNotificationRule^>^ notificationRules, 
	AFStatus newStatus
)
static member SetStatus : 
        notificationRules : IList<AFNotificationRule> * 
        newStatus : AFStatus -> AFErrors<AFNotificationRule> 

Parameters

notificationRules
Type: System.Collections.GenericIListAFNotificationRule
The list of AFNotificationRule to have their Status set to the specified newStatus value.
newStatus
Type: OSIsoft.AF.AnalysisAFStatus
The new AFStatus for the AFNotificationRule.

Return Value

Type: AFErrorsAFNotificationRule
An AFErrorsTKey object containing any AFNotificationRule that generated errors. Returns if no errors.

Exceptions

ExceptionCondition
SecurityException This exception is thrown when the user does not have Write permission on one of the AFNotificationRule in the specified list.
ArgumentException This exception can be thrown if one of the items in the notificationRules list has been deleted.

Remarks

This method will set all the AFNotificationRule in the list to the same AFStatus in a single call to the server. This is more efficient than setting the Status property of each AFNotificationRule.

Version Information

AFSDK

Supported in: 3.1.1, 3.1.0, 3.0.2, 3.0.1, 3.0.0, 2.10.11, 2.10.5, 2.10.0, 2.10, 2.9.5, 2.9, 2.8.5, 2.8

See Also

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in