LastAccessed (NotesDocument - JavaScript)

Read-only. The date/time a document was last modified or read.

Defined in

NotesDocument

Syntax

getLastAccessed() : NotesDateTime

Usage

The value returned is exact only to the day, not the hour. If the document is edited, the property is always updated. If the document is read more than once during the same 24-hour period, the value is only updated the first time accessed.

Examples

This computed field displays the creation, initially modified, last modified, and last accessed dates of the current document.
var doc:NotesDocument = currentDocument.getDocument();
var msg = "This document was created on " + doc.getCreated().getDateOnly();
var im:NotesDateTime = doc.getInitiallyModified();
if (im !=null && im != 0) {
	var msg = msg + ", initially modified on " + im.getDateOnly();
}
var lm:NotesDateTime = doc.getLastModified();
if (lm != null && im != 0) {
	var msg = msg + ", last modified on " + lm.getDateOnly();
}
var la:NotesDateTime = doc.getLastAccessed();
if (la != null && la != 0) {
	var msg = msg + ", last accessed on " + la.getDateOnly();
}
return msg