Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






Examples: UserName property

  1. In this button script, the variable user gets assigned the current user's name. Because the script runs on the workstation, the user's name belongs to the person using Notes at the time. For example, if user Stew Malone/Editorial/Acme clicks the button, the UserName property returns "CN=Stew Malone/OU=Editorial/O=Acme."
  2. Sub Click(Source As Button)
    
    Dim session As New NotesSession
    Dim user As String
    user = session.UserName
    End Sub
  3. In this agent script, the variable user gets assigned the current user's name. For example, if the agent runs when new mail arrives on server Toronto/Editorial/Acme, the UserName property returns "CN=Toronto/OU=Editorial/O=Acme" because the current user is the server. If user Stew Malone/Editorial/Acme runs the agent manually from the menu, it returns "CN=Stew Malone/OU=Editorial/O=Acme" because the current user is Stew Malone.
  4. Sub Initialize
    
    Dim session As New NotesSession
    Dim user As String
    user = session.UserName
    End Sub
Related topics
UserName property




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009