markAllRead (NotesView - JavaScript)

Marks all documents in the view as read.

Defined in

NotesView

Syntax

markAllRead(username:string) : void
Parameter Description
username If present, the method marks all of the documents in the view read on behalf of the given name. If omitted, the method marks all of the documents in the view read on behalf of the current user ID.

Usage

If the database does not track unread marks, all documents are considered read, and this method has no effect.

Examples

This button filters a view and marks the results as read.
database.updateFTIndex(true);
var v1:NotesView = database.getView("main");
if (requestScope.query.isEmpty()) {
	requestScope.status = "No query";
	return;
}
var n:int = v1.FTSearch(requestScope.query);
if (n > 0) {
	v1.markAllRead();
	requestScope.status = "Hits marked as read: " + n.toFixed();
} else {
	requestScope.status = "No hits";
}