markAllRead (NotesDocumentCollection - JavaScript)

Marks all the documents in a collection read.

Defined in

NotesDocumentCollection

Syntax

markAllRead() : void

markAllRead(username:string) : void

Parameter Description
username If present, the method marks all the documents in the collection as read on behalf of the given name. If omitted, the method marks the notes as 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 marks as read documents that match a search query in the current database.
var dc:NotesDocumentCollection = database.getAllDocuments();
var query:string = requestScope.query;
if (!query.isEmpty()) {
	query = "\"" + query + "\"";
	database.updateFTIndex(true);
	dc.FTSearch(query);
	dc.markAllRead();
} else {
	requestScope.status = "No query";
}