Document deletion mystery

I am the developer of an application with soft deletions activated. In the trash I regulary find documents that appear to be deleted by me. But I haven’t touched them, not even been close to a computer at certain deletion times. The deletions are always made during office hours, which leads me to believe that there is some human action behind.

The obvious answer would be that someone is triggering a deletion agent signed by me, but there is no such agent. To be sure I have searched the design for the following keywords:

(NotesDocument).Remove

(NotesUIDocument).DeleteDocument

@DeleteDocument

@Command([EditClear])

I have looked in the server logs for any agent action but found nothing. The database resides on two clustered servers.

Someone suggested that some user had a local replica with a deletion agent that was protected from refresh. So we changed the replica ID. It didn’t help. We have also deleted and recreated one of the replicas.

I cannot remove my own deletion rights in the ACL, since there IS an agent that makes deletions, but this is a scheduled procedure that removes documents permanently and at 04:30 in the morning.

I have considered the Querydocumentdelete event in the database script, but I assume that it will not help if there is actually an agent running.

I have also considered the known method to remove the users’ deletion rights and instead letting them flag the documents for deletion and thus hide them from the regular views. But that won’t help either if there is an agent in action.

In the Designer Help there is an entry “Unexpected deletions occur in a replica”. It recommends the replication settings that prevent sending/receiving deletions, but that doesn’t sound as a good idea in a server cluster. The setting “Remove document not modified in the last days” is not activated. Neither is there a replication formula.

Now I’m running out of ideas how to solve this very annoying mystery. Is it someone out there who could shed some light over this before I loose my wits? I would be eternally grateful!

Subject: Document deletion mystery

“In the trash I regulary find documents that appear to be deleted by me”, what makes you think they were deleted by you? Deleting docs via the UI does not modify them so it would not stamp them as modifed by you.

Subject: How does Notes recognize a soft-deleted document?

Dear Paul, thank you for this comment. It helped me to look in the right direction. We have a standard trash view in all our applications. I have never questioned it. There is a “Deleted by” column that displays the last name in the $UpdatedBy field. But when I look up the corresponding date in the $Revisions field I see that this date is not the same as “Last Modified”, which shows the actual date and time for the soft deletion. So I have wrongly assumed that I have somehow, by accident, deleted documents that in fact were purposefully deleted by users.

I did create a Postdocument delete event that sent a mail with info about the user, so I got a confirmation that it really was human activity behind the deletions.

How can this special trash view recognize a deleted document? Once the view is created there is no way to see that it’s special, at least I can’t find any property. Is there no way to see who pulled the trigger?

Subject: RE: How does Notes recognize a soft-deleted document?

No, there is nothing for you to know who made the deletion. You would need to code it.