Hi All,Function GoApprove(Doc As NotesDocument, UserName As String, Status As String) As Boolean
Dim Category As NotesItem
Msgbox Status
Select Case Status
Case "Awaiting CalSTRS Real Estate First Approval"
Set Category = Doc.GetFirstItem("Category_1")
Forall x In Doc.Apptype
If Catergory.Contains(x) Then
'There is one more type user need to approve so we will update the Audit Log and exit
GoApprove=False
Exit Function
End If
End Forall
GoApprove=True
Case "Awaiting CalSTRS Real Estate Second Approval"
Set Category = Doc.GetFirstItem("Category_2")
Forall x In Doc.Apptype
If Not Catergory.Contains(x) Then
GoApprove=False
Exit Function
End If
End Forall
GoApprove=True
when i am debugging above code i got error “variant does not contain an object” at if not Category.Contains(x) then line,
i am taking Category variable as a notesitem, we can use contains method on notesitem.i am not using any variant variable here. but i am getting this error. if anyone knows please help me.
thanks,
Prasad