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"
Dig Deeper on Domino Resources - Part 4
Remove orphaned Lotus Notes documents on Domino databases with a 'virtual delete'
LotusScript code to update and save Lotus Notes profile documents
How to create a comments field for Lotus Notes documents
Workaround for @DBLookup error: 'The specified database lookup generated more than 65,000 bytes of r