I am running this agent & getting error “No Resume” and line at which it occurs is line 23 in my code. I am trying to find group to which user belongs to & display it in msgbox + count and display number of Group documents user is in.
Declarations
Dim s As NotesSession
Dim sourcenote As NotesDocument
Dim sourceview As NotesView
Dim nextnote As NotesDocument
Dim DocsUpdated As Integer
Dim item As NotesItem
Dim key As String
Sub Initialize
Set s = New NotesSession
Dim key As String
On Error Goto Errhandle
Set sourcedb = s.CurrentDatabase
Set sourceview = sourcedb.GetView("($VIMGroups)")
DocsUpdated = 0
'Mention user name here
key = Lcase("CN=Ashok Nawani/O=Fiberlink")
Msgbox " Entry to search is " + key
Set sourcenote = sourceview.GetFirstDocument()
While Not(sourcenote Is Nothing)
Print "Group document is " & sourcenote.listname(0)
’ Msgbox "Group document is " + sourcenote.listname(0)
'Set nextnote = sourceview.Getnextdocument(sourcenote)
Set item = sourcenote.GetFirstItem("Members")
Forall v In item.values
If key = Lcase(v) Then
Msgbox "Found in Group Document " + sourcenote.listname(0)
DocsUpdated = DocsUpdated + 1
End If
End Forall
’ Loop to next document
’ Set sourcenote = nextnote
Set sourcenote = sourceview.Getnextdocument(sourcenote)
Wend
Msgbox " Total Group Documents User Belongs To " & DocsUpdated
'Trap the details of the error in server log file
Errhandle:
Print "Error number " & Err & ": " & Error$ & Chr(10) + Chr(13) & " This error occurred at line number " & Erl
End Sub