You need to sign in to do that
Don't have an account?
Delete before and after Trigger events not firing for Files
Good day.
I am trying to prevent users from deleting files they have uploaded via the Files related list on Cases. I want to add simple code in a trigger that will warn a user that he cannot delete Files linked to Cases.
These files are stored as FeedItems that points to the ContentVersion and ContentDocument objects.
The issue that I have is that none of the triggers fires when a user deletes a File on cases. When you add a File via the related list upload button, 2 triggers fire (ContentVersion and ContentDocumentLink), but with a delete the before OR after delete events never executes.
Can anyone shed some light on this behaviour?
Thanks,
Rudolf Niehaus