NoteID (NotesViewEntry - JavaScript)

Read-only. The note ID of a document associated with a view entry.

Defined in

NotesViewEntry

Syntax

getNoteID() : string

Usage

This property returns the empty string for entries of type category and total.

Examples

This button writes the document note ID for a view entry to a global variable.
var bycat:NotesView = database.getView("main");
if (requestScope.query.isEmpty()) return;
var entry:NotesViewEntry = bycat.getEntryByKey(requestScope.query);
if (entry == null || entry.getDocument() == null) {
	requestScope.noteid = null;
	return;
}
requestScope.noteid = entry.getNoteID();
This computed field uses the note ID to display the value of an item in the document.
if (requestScope.noteid == null) {
	return null;
}
var doc:NotesDocument = database.getDocumentByID(requestScope.noteid);
return doc.getItemValueString("subject");