Good day everyone!
What I’d like to do is to prevent the user to open a doc in a view if:
-
user != AddUserId (of the doc)
-
user has no roles of “aaAdmin”
Now, I was able to see the ff.codes in Notes Help:
Sub Queryopen(Source As Notesuidocument, Mode As Integer, Isnewdoc As Variant, Continue As Variant)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim entry As NotesACLEntry
Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetEntry( session.UserName )
If ( entry Is Nothing ) Then
continue = False
Elseif Not ( entry.IsRoleEnabled( "xxAdmin" ) ) Then
continue = False
End If
End Sub
So basically, I can now work on the things I’d like to do, however I got this error: Wrong argument number for event handler.
If it does not work on QueryOpen in view, where else can I put this script for me to add (source.FieldGetText(“AddUserID”)) in the script above?
I just upgraded to win7 OS and my designer is in ver. 8.5
Thank you very much.
Best regards,
OSO