markAllUnread (NotesView - JavaScript™)
Marks all documents in the view as unread.
Defined in
NotesViewSyntax
markAllUnread(username:string) : void
Parameter | Description |
---|---|
username |
If present, the method marks all of the documents in the view unread on behalf of the given name. If omitted, the method marks all of the documents in the view unread on behalf of the current user ID. |
Examples
This button filters a view and marks the results as unread.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.markAllUnread();
requestScope.status = "Hits marked as unread: " + n.toFixed();
} else {
requestScope.status = "No hits";
}