getLastEntry (NotesViewEntryCollection - JavaScript)

Gets the last entry in a view entry collection.

Defined in

NotesViewEntryCollection

Syntax

getLastEntry() : NotesViewEntry
Return value Description
NotesViewEntry The last entry in the view entry collection. If there are no entries in the collection, returns null.

Examples

This button gets all the documents in a view in reverse order.
var vec:NotesViewEntryCollection = database.getView("main").getAllEntries();
var entry:NotesViewEntry = vec.getLastEntry();
while (entry != null) {
	var subject:string = entry.getDocument().getItemValueString("subject");
	requestScope.status += "\n" + subject;
	var tmpentry:NotesViewEntry = vec.getPrevEntry(entry);
	entry.recycle();
	entry = tmpentry;
}