getRead (NotesDocument - JavaScript)

Returns whether a document was read by a user.

Defined in

NotesDocument

Syntax

getRead() : boolean

getRead(username:string) : boolean

Parameter Description
username The name of the user. Defaults to the name of the current user.
Return value Description
boolean True if the current document has been read by the user. False otherwise.

Examples

This button reports whether a user has read the documents in a view in the current database.
try {

var username:string = requestScope.query; // edit box
var view:NotesView = database.getView("main");
var doc = view.getFirstDocument();
while (doc != null) {
	requestScope.status =  requestScope.status + "\n" + username + 
	((doc.getRead(username)) ? " has " : " has not ") + "read " + doc.getItemValueString("subject");
	var tmpdoc = view.getNextDocument(doc);
	doc.recycle();
	doc = tmpdoc;
}

} catch(e) {
	requestScope.status += "\n" + e.toString();
}