Adding Trash in Lotus Applications

Hello Everybody!I wanted to know if it´s possible to add a trash folder in a lotus application.

I´ve already created a trash folder ($Trash), and I know we have several @functions and lotus script methods to use, but when I try to move documents ti the trash folder they don´t appear there.

Any ideas??

Thanks in advance

Subject: Do you have soft-deletes turned on?

APPLICATION DESIGN

Adding a view for soft deletions

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

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.

See Also

Adding a trash folder to an application

Glossary

Feedback on Help or Product Usability?

Subject: Adding Trash in Lotus Applications

Did you get any solution to this?i get the same problem with one of my applications.

it use to not have a check mark next to the ‘allow soft deletions’

i added a check mark, i have also added a folder called “($Trash)” and i even tried to put some code in the delete query but it still didn’t work.;

'---------------------------------------

Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)

Dim accessgranted As Boolean

Dim flag As Boolean

Set s = New NotesSession

Set db = source.Database	

Set acl = db.ACL

Set entry = acl.GetEntry( s.UserName )

Set CollDocDetruit = source.Documents

accessgranted = False

flag = False

'check for the role

Forall r In entry.Roles

	If r = "[Admin]" Then

		accessgranted = True

	End If

End Forall

'check if don't have the role if it's

'in draft, you are allowed since you 

'only see your documents



If accessgranted = False Then

	Set DocDetruit = CollDocDetruit.GetFirstDocument

	While Not DocDetruit Is Nothing

		If DocDetruitdoc.AlreadySent(0) <> "0"  Then

			accessgranted = False

		End If				

		Set DocDetruit = CollDocDetruit.GetNextDocument(DocDetruit)

	Wend		

End If

If accessgranted = False Then			

	Messagebox "You can only delete drafts"

	continue = False

	Exit Sub	

Else				

	'user allowed to delete

	Set DocDetruit = CollDocDetruit.GetFirstDocument

	While Not DocDetruit Is Nothing

		'move to trash

		DocDetruit.PutInFolder("($Trash)")

		Set DocDetruit = CollDocDetruit.GetNextDocument(DocDetruit)

	Wend

End If	

End Sub

'---------------------------------------

Subject: Adding Trash in Lotus Applications

  1. make sure you have made the trash folder flat - i.e. don’t show document response hierarchy.

  2. have you made the folder shared, public?

Subject: RE: Adding Trash in Lotus Applications

I created flat and share