In the special Trash view of a database is it possible to stop the user from hard deleting a document.
We are using Soft Deletions and want the document to be deleted once the time period has elapsed. We do NOT want the user to have the ability to delete the document permantly.
For some reason the QueryDeleteDocument does not work with these special views.
any help appreciated
Subject: Trash View - stopping hard deleting
Your best option is to remove delete permissions altogether for users, and instead have an action that changes the form. Your “trash folder” would be a view that selects that form, and actual deletions would be carried out by a scheduled agent that has delete permission.
Subject: RE: Trash View - stopping hard deleting
The problem with this is that documents aren’t moved from Folder (which the users make extensive use of). We were doing something like this and using FolderPreferences but again, that was painful and didn’t really suit our needs.
Thanks for the suggestion anyway.
Subject: RE: Trash View - stopping hard deleting
Look – users either have delete permissions, or they don’t. If they don’t have delete permissions, they can’t do soft deletes either, and if they do have delete permissions, you can’t prevent them from emptying the trash. If you’re not willing to code around the problem (remove the users’ delete permissions, mark the documents for scheduled deletions and remove them from any folders they may be living in), then you’ll have to put up with the built-in functionality.
Subject: RE: Trash View - stopping hard deleting
It is not about coding around the problem. The soft delete is “coding around the problem” and has it own sets of problems.
We use a lot of Folders. If a document is deleted via coding then you also need to remove them from the Folders. We did this using FolderPreferences. FolderPreferences has a lot of overheads. Also, if you delete a folder then this folder is not removed from the FolderReferences of the individual document.
I could code that each document deletion went and searched through every folder and removed itself. The problem again is overheads. There are well over 8,000+ db of these db’s on each server and that is just in 1 country. It will slow the processing time down to much. Also, the client do not want 8,000+ scheduled agents kicking off constantly.
So, what I was hoping for was a nice way to take advantage of soft deletion and it use of removing documents from folders.
And I am afraid your last statement is too typical of developers. A user does not have to put up with built-in functionality. It is us as the BA and programmers to find work arounds.