CommonUserName (NotesSession - JavaScript)

Read-only. The common name of the user that created the session.

Defined in

NotesSession

Syntax

getCommonUserName() : string

Usage

This is the name of the "user" running the script, which for a server-side script is the server name. For the name of the user logged into the server, use EffectiveUserName (NotesSession - JavaScript).

If the user name is flat (non-hierarchical), this is the same as UserName (NotesSession - JavaScript).

Examples

This computed field displays the common user name, server name, and distinguished user name for the current session.
var server = session.getServerName();
if (server != "") {
	server = " on server " + server;
} else {
	server = " locally";
}
return "You are logged in as " + session.getCommonUserName() +
server + ". Your full name is " + session.getUserName() + "."