@UndeleteDocument (Formula Language)

In a database with "Allow soft deletions" selected, this command restores a deleted document.

Note: This @function is new with Release 5.




This @function can be used in toolbar button, hotspot, action, and agent formulas.

To allow soft -- that is, delayed -- deletions, go to the Advanced tab of database properties, check "Allow soft deletions," and specify an integer value for "Soft delete expire time in hours." Soft-deleted documents appear to be deleted but are held in the database for the specified number of hours before actual deletion.

To see the soft-deleted documents, create a view of type "Shared, contains deleted documents." To restore a soft-deleted document, run @UndeleteDocument on it before the "Soft delete expire time in hours" expires.


This is the formula for an action in a view of type "Shared, contains deleted documents." The user can go to this view, see the documents that are soft-deleted, and run this action on selected documents to restore them. The database must "Allow soft deletions" and specify "Soft delete expire time in hours."