deleteEntry (NotesViewEntryCollection - JavaScript)

Deletes an entry from a view entry collection.

Defined in

NotesViewEntryCollection

Syntax

deleteEntry(entry:NotesViewEntry) : void
Parameter Description
entry The view entry to be deleted. Cannot be null. Must be of type document.

Usage

This method decrements the view entry collection count returned by getCount.

This method throws an exception if the entry is already deleted.

This method throws an exception if the entry is from another collection.

A deleted NotesViewEntry object is invalid and cannot be used for navigation purposes.

Examples

This button puts in a folder documents found through a search minus the current document.
if (requestScope.query.isEmpty()) return;
if (!database.isFTIndexed()) database.createFTIndex(0, false);
var vec:NotesViewEntryCollection = database.getView("main").getAllEntries();
vec.FTSearch(requestScope.query);
if (vec.getCount() > 0) {
	var doc:NotesDocument = currentDocument.getDocument();
	if (doc != null) var entry:NotesViewEntry = vec.getEntry(doc);
	if (vec.contains(entry)) {
		vec.deleteEntry(entry);
	}
	vec.putAllInFolder("searchResults", true);
	requestScope.status =  "Document(s) put in folder";
} else {
	requestScope.status =  "No match";
}