EditRestoreDocument @Command (Formula Language)

Performs the menu command Edit - Restore.

Note: This function is new with Release 6.

Syntax

@Command( [EditRestoreDocument] )

Usage

In a soft deleted document, restores the document to the view or folder it was deleted from.

In a soft deletions view, restores the selected documents to the folders or views from which they were deleted.

To create a soft deletions view:

  1. Select File - Database - Properties from the menu bar.
  2. On the Advanced tab of the Database Properties box, select Allow soft deletions.
  3. From the View design list in Domino® Designer, select the New View button.
  4. In the Create View dialog box, enter a name for the view, then choose "Shared, contains deleted documents" as the View type and click Ok.

    This creates a view that holds any documents deleted from other views or folders in the database. To permanently remove a document from the database, you must delete it from this view.

This command does not work on the Web.

Examples

  1. This code, when used in the Restore action button on a form, enables you to return a document accessed from a soft deletions view called "DeletedDocs" to the view or folder that it was deleted from.
    @Command([EditRestoreDocument])

    You may want to add a Hide When formula to the Restore action button so it only displays on the form when the current document is a soft deleted document. Select the Hide action if formula is true check box and enter the following code in the formula window.

    @ViewTitle != "DeletedDocs"
  2. This code, when added to the Restore action button in a soft deletions view, returns the currently selected documents to the respective views and folders from which they were deleted.
    @Command([EditRestoreDocument])