removePermanently (NotesDocument - JavaScript™)
Permanently deletes a document from a database, doing a hard deletion even if soft deletions are enabled.
Defined in
NotesDocumentSyntax
removePermanently(force:boolean) : boolean
Parameter | Description |
---|---|
force |
If true, the document is deleted even if another user modifies the document after the program opens it. If false, the document is not deleted if another user modifies it. |
Return value | Description |
---|---|
boolean |
|
Usage
This method does a hard deletion even ifAllow soft deletionsis enabled. See remove to do a soft deletion.
A deleted document cannot be used as a basis for navigation in a view or a document collection.
Examples
This button removes all the documents in a folder.var view:NotesView = database.getView("oldstuff");
var doc:NotesDocument = view.getFirstDocument();
while (doc != null) {
var subject:string = doc.getItemValueString("Subject");
doc.removePermanently(true);
requestScope.status += "\n\"" + subject + "\" removed";
doc = view.getFirstDocument();
}