isNewNote (NotesXspDocument - JavaScript)

Checks if a new document is being created.

Syntax

isNewNote() : boolean
Return value Description
boolean true if a new document is being created based on the current context; false otherwise.

Examples

This label displays a message if the document associated with the current XPage is new and an item value if it is not new.
if(document1.isNewNote()) {
	return "New subject";
} else {
	return document1.getItemValueString("subject");
}