How to Set CustomField in alerts
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
How to Set CustomField in alerts

 
Post new topic   Reply to topic    Windows Server Forum Index -> MOM
Author Message
JY
Guest





Posted: Sun Nov 13, 2005 9:50 am    Post subject: How to Set CustomField in alerts Reply with quote

I have a script to generate MOM alerts and at the same time I want use to
the CustomFields to store metadata such as application information. However
I wasn't able to get the SetCustomField to submit data. Any help is
appreciated.

Thanks
jy


Const ALERT_Critical_Error = 50
CreateNewAlert Name, AlertLevel, Compuer, Domain

Sub CreateNewAlert()
Dim objCreatedAlert
Set objCreatedAlert = ScriptContext.CreateAlert()
objCreatedAlert.Name = "Name"
objCreatedAlert.AlertLevel = ALERT_Critical_Error
objCreatedAlert.AlertSource = "TEST SOURCE"
objCreatedAlert.Description = "Test description"
ScriptContext.Submit objCreatedAlert

CALL objCreatedAlert.SetCustomField(1, "WST")

Set objCreatedAlert = Nothing
End Sub
Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> MOM All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB