difficult to evaluate user roles. This code is triggered from the Entering
event on a field allowing you to Evaluate groups to see if a role is enabled
and therefore if that individual is authorized to edit a field.
This code is placed in the Entering event.
Note! You may want to Enforce a Consistent ACL Across All Replicas as an added
Sub Entering(Source As Field)
Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument
Set uidoc = workspace.CurrentDocument
'Checks to see if you are a member of a group assigned the role
Roles = Evaluate(|@isMember("[RoleName]";@UserRoles)|)
If Roles(0) = 1 Then
'if yes, the code does nothing
'if no, you are kicked to the top of the document
Msgbox "You are not authorized to enter information in that field" ,
16 , "Warning"