Document (NotesViewEntry - JavaScript)

Read-only. The document associated with the view entry.

Defined in

NotesViewEntry

Syntax

getDocument() : NotesDocument

Usage

Returns null if the view entry is not a document. Returns null if the document is deleted after the NotesViewEntry object is created.

Documents retrieved from view entries do not have ColumnValues, FTSearchScore, or ParentView set. These values should be accessed via the ColumnValues, FTSearchScore, and Parent properties of the NotesViewEntry object that contains the document.

Examples

This button gets the last accessed time for a view entry.
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.status = "Invalid entry";
	return;
}
requestScope.status = entry.getColumnValues().firstElement() + " last accessed on " +
entry.getDocument().getLastAccessed().getLocalTime();