We use a simple trigger to prevent most users from deleting Attachments -- only if the Profile Name = System Administrator can the user delete the attachment. Once we transform existing Attachments to Files, we need to ensure that even if someone is the Owner of the file they cannot delete it. Will we have to write a similar trigger in order to prevent Files from being deleted by most users?
1 commentaire
You can use the same type of trigger. Just switch it to be on ContentVersion -before delete