getCommonName (DirectoryUser - JavaScript)

Gets the common name of the directory entry.

Syntax

getCommonName() : string
Return value Description
string The common name of the directory entry.

Usage

A common name is the CN component of a distinguished name without the CN=. For example: John B Goode where the distinguished name is CN=John B Goode/OU=East/O=Acme.

Example

This computed field displays the common name of the directory entry for the current user.
return context.getUser().getCommonName()