Below is my code. It does not work. No surprise since I am posting. What it does, is add a comment to the notification instance. The oResult returns a value of “new instance”.
'Get Recent Alarms
Dim oRecent = NewAFTime("-1h")
notificationInstances = notificationList2.GetInstances(oRecent)
ForEach instances In notificationInstances
Dim oNote = AFNotification.FindNotification(myPISystems.Item(mPISystem), instances.NotificationID)
Dim oContact = oNote.NotificationContacts("Lonnie Bowling_Email")
If oContact <> Nothing Then
ForEach oInst In instances.Instances
Dim oTest AsANNotification = NewANNotification(oNote)
'Dim oTest As ANNotification = ANNotification.GetServiceVersionForDatabase(myDB)
If oInst.IsAcknowledged = FalseThen
Dim oResult = oTest.AcknowledgeInstance(oInst.InstanceID, oContact.ID, "test")
'Dim oResult = oTest.AcknowledgeSubscription(oInst.InstanceID, oContact.ID, "test")
Another question associated with this code, how do I use the GetServiceVersionForDatabase function call? I would like to just use it since it is already started. It returns an integer, but I’m lost as to what to do with it.