NoteID (NotesDocument - JavaScript)

Read-only. The note ID of a document, which is a hexadecimal value of up to 8 characters that uniquely identifies a document within a particular database.

Defined in

NotesDocument

Syntax

getNoteID() : string

Usage

A typical note ID looks like this: 20FA. A note ID represents the location of a document within a specific database file, so documents that are replicas of one another generally have different note IDs. A note ID does not change, unless the document is deleted.

Examples

This button gets a document given its Note ID.
try {
	var noteid:string = requestScope.query;
	if (noteid.startsWith("NT")) { // in case it comes from @NoteID 
		noteid = noteid.substring(3);
	}
	var doc:NotesDocument = database.getDocumentByID(noteid);
	requestScope.status = doc.getItemValueString("subject");
} catch(e) {
	requestScope.status = "Invalid note ID";
}