Prevent doc delete i certain status

I want to prevent users from deleting documents when they have a certain content in the “Status” field, but users who have delete acces may delete in all other statuses. In QueryDocumentDelete in Database script I can only prevent deleting from a spesified view. Any suggestions?

Subject: Prevent doc delete i certain status

Why can you only prevent deleting from a certain view?

In querydocumentdelete you can get a handle on the documents being deleted, regardless of where they’re being deleted from. Use the db.unprocessdocuments method and you’ll have a collection of documents currently selected for deletion. You can then test against any criteria you want, including the status of a particular field of course.

Dan

Subject: RE: Prevent doc delete i certain status

It works perfect. Thanks !