getPrevEntry (NotesViewEntryCollection - JavaScript)

Gets the entry immediately preceding the current or a specified entry in a view entry collection.

Defined in

NotesViewEntryCollection

Syntax

getPrevEntry() : NotesViewEntry

getPrevEntry(entry:NotesViewEntry) : NotesViewEntry

Parameter Description
entry Any entry in the view entry collection. Cannot be null.
Return value Description
NotesViewEntry The entry preceding the current or specified entry. If there is no previous entry, 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;
}