getFirstEntry (NotesViewEntryCollection - JavaScript)

Gets the first entry in a view entry collection.

Defined in

NotesViewEntryCollection

Syntax

getFirstEntry() : NotesViewEntry
Return value Description
NotesViewEntry The first 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.
var vec:NotesViewEntryCollection = database.getView("main").getAllEntries();
var entry:NotesViewEntry = vec.getFirstEntry();
while (entry != null) {
	var subject:string = entry.getDocument().getItemValueString("subject");
	requestScope.status += "\n" + subject;
	var tmpentry:NotesViewEntry = vec.getNextEntry(entry);
	entry.recycle();
	entry = tmpentry;
}