Key (NotesDocument - JavaScript)

Read-only. If a profile document, the user name (key) of the profile.

Defined in

NotesDocument

Syntax

getKey() : string

Examples

This computed field displays the name of a profile document and its key if the underlying object is a profile document. The global variable requestScope.doc is set before the document is loaded.
if (sessionScope.doc != null) {
	if (sessionScope.doc.isProfile()) {
		return sessionScope.doc.getNameOfProfile() + "\n" + sessionScope.doc.getKey();
	} else {
		return "Not a profile"
	}
}