markRead (NotesDocument - JavaScript)

Marks a document as read.

Defined in

NotesDocument

Syntax

markRead() : void

markRead(username:string) : void

Parameter Description
username If present the method marks the document read on behalf of the given name. If omitted, the method marks the document 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 the current document as read.
var doc:NotesDocument = currentDocument.getDocument();
var rdoc:NotesDocument = database.createDocument();
rdoc.appendItemValue("Form", "response");
rdoc.appendItemValue("Subject", session.getCommonUserName() + " has read this document<>");
rdoc.makeResponse(doc);
doc.markRead();
if (rdoc.save()) {
	requestScope.status = "Response posted and document marked read";
} else {
	requestScope.status = "Unable to save response";
}