IsDeleted (NotesDocument - JavaScript)

Read-only. Indicates whether a NotesDocument object represents an existing document (not a deletion stub) on an ongoing basis.

Defined in

NotesDocument

Syntax

isDeleted() : boolean
Legal value Description
true if the document is a deletion stub
false if the document exists

Usage

IsDeleted indicates the current state. IsValid indicates the initial state.

Examples

This button gets the subject item for all documents in the database checking to ensure the documents are valid and not deletion stubs.
var db:NotesDatabase = session.getDatabase("Sales1/Acme", "west\\sales", false);
if (db == null) {
	requestScope.status = "Cannot open NotesUA/Westford/Notes//bobtest\\DatabaseEtc";
	return;
}
var dc:NotesDocumentCollection = db.getAllDocuments();
if (dc.getCount() == 0) {
	requestScope.status = "No documents in database";
	return;
}
requestScope.status = "Documents in database:";
var doc:NotesDocument = dc.getFirstDocument();
while (doc != null) {
	if (!doc.isValid()) {
		var subject = "[document is not valid]";
	} else if (doc.isDeleted()) {
		subject = "[document is deletion stub]";
	} else {
		subject = doc.getItemValueString("subject");
	}
	requestScope.status += "\n" + subject;
	var tmpdoc = dc.getNextDocument(); doc.recycle(); doc = tmpdoc;
}