Microsoft Operations Manager

GetCustomField Method

The GetCustomFieldmethod gets the value of a user-defined custom field of an alert.

Alert.GetCustomField(FieldNumber Integer)


Specifies the number of the user-defined custom field to get. Possible values for the FieldNumberparameter are 1, 2, 3, 4, and 5 to get the first through fifth custom fields, respectively.

Return Value



The following example shows how to get the value of the second user-defined custom field of an alert.

Function GetAlertCustomData()
	Dim objAlert
	Dim strCustomField2

	If (ScriptContext.IsAlert()) Then
		Set objAlert = ScriptContext.Alert
		strCustomField2 = objAlert.GetCustomField(2)
		Set objAlert = Nothing
	End If

	GetAlertCustomData = strCustomField2
End Function


Windows NT/2000: Requires Windows 2000 or later
Version: Requires MOM 1.0 SP1

See Also

Alert Object

Did you find this information useful? Please send your suggestions and comments about the documentation to