Domino Code Fragment

Code Name*
UserNameObject property
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.18.217.182.45
Description*
This agent gets a Name object for the current user and prints the common user name.
Type*
Java
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
import lotus.notes.*;


public class usernameobjectagent extends AgentBase
{
 public void NotesMain()
   {
   try
     {
       Session s = getSession();
       Name no = s.getUserNameObject();
       String u = no.getCommon();
       System.out.println("Common user name = " + u);
     }
   catch (Exception e)
     {
       e.printStackTrace();
     }
   }
}