Tuesday, September 8, 2009

Check current users role is [Admin] in lotusscript

Today i came across to check the current user's role is [Admin] or not in Lotusscript.


Here is the code: LotusScript:

Sub Initialize
Dim session As New notessession
Dim db As NotesDatabase
Dim roles As Variant

roles = Evaluate("@UserRoles = ""[Admin]""")
Msgbox Cstr(roles(0)) ' if the message box shows 1 then the current user has Admin role.
End Sub

1 comment:

Search This Blog