Adding a view for soft deletions

About this task

In some databases, selecting a document and choosing Edit - Delete permanently deletes the document from a database. In other databases, such as the Notes® mail database, choosing Edit - Delete moves the document into a Trash folder and stores it in a state of "soft deletion." This state makes it possible for a user to restore a document deleted in error. You can turn on soft deletions for a database and control how long to retain soft deletions in a database before actually deleting the documents.

To turn on soft deletions for a database


  1. Select the database in the Bookmark pane and choose Edit - Properties.
  2. On the Advanced tab of the Database properties box, check "Allow soft deletions."
  3. Set a value for "Soft delete expire time in hours." The default value is 48 hours. After that amount of time elapses, soft deletions are permanently removed from the database.

Displaying and restoring soft-deleted documents

About this task

Documents in the 'soft delete' state do not display in typical views and folders. Instead, you must create a shared view to contain and display documents in the soft deletion state. In this view, you can provide the user with an action programmed to un-delete documents and restore them to the database. In the Notes client, you can program the action with the formula @UndeleteDocument. In the Notes client, the "Remove from Trash" action in the Trash folder restores deleted mail messages.

A user can permanently delete documents from the Trash folder by selecting one or more documents and choosing Edit - Delete or by pressing the DEL key. You could also provide an action that uses the @HardDeleteDocument command to permanently remove documents from the Trash folder. For an example of this, see the "Empty Trash" action in the Trash folder.