Documents don’t really disappear from dB’s so something else is happening.
I’ve had this issue a few times.
I’d think about removing the ability of anyone to delete, even the Local Servers, from the ACL. If they still disappear after this then maybe something else if changing them. Are there any agents running over them, maybe moving then to another, archive, db? Maybe the agent is changing their form name?
What I ended up doing in practice was this:
Setting up a Trash can;
Open each Form type that is dissapperaing.
Create a new field called $DeletedDoc of type Text with a default value of “”. also make it computed when composed.
now create a view of all documents. Create an action in the view with the following formula:
Selected any old documents you want the new field to be in and run the action over them.
so now your existing docs have the new field and any new ones will also have the field.
now in every existing view amend the formula to to say
your exsiting formula…
This will filter out any documents where $DeletedDoc has a value. Only docs in our trash can will have a value in this field.
Now open the database script and in the Querydocumentdelete event place this code
Dim session As New notessession ‘
Dim actualCollection As NotesDocumentCollection
Dim DocDate As NotesDateTime
Dim dtNow As New NotesDateTime(Now)
Dim note As NotesDocument
Dim Uname As New NotesName(session.UserName)
Dim collection As NotesDocumentCollection
Set collection = source.documents
While Not note Is Nothing
Call note.ReplaceItemValue(“$DeletedDoc”,Now & “#” & session.UserName)
Continue = False
now documents are deleted but trashed.
If anyone or agent is deleting the document won’t be deleted but will be trashed.