You need to sign in to do that
Don't have an account?
BeforeDelete trigger not firing on ContentDocumentLink object.
I have a trigger on ContentDocumentLink object. I have use case to show total number of Files and number of notes attached if the link was between Events and Content (Files/Notes) using Salesforce Content. And, offcourse, similar thing that needs to be done when a content is removed, I implemented beforeDelete event as well.
Code
Code
trigger ContentDocumentLinkTrg on ContentDocumentLink (after insert, before delete) { //Check if customization is not enable through custom settings if(!CustomSettingsUtil.IsCustomizationEnabled()) { return; } String BeforeOrAfter = (Trigger.isBefore ? 'Before' : 'After'); String TriggerType = '' + (Trigger.isDelete ? 'Delete' : '') + (Trigger.isInsert ? 'Insert' : ''); system.debug(BeforeOrAfter + ' ' + TriggerType ); // run TriggerHandler new ContentDocumentLinkTriggerHandler().run(); }Checking the debug log, it is entering the AfterInsert event but not BeforeDelete. I see no restrictions in the SF documentation, can anyone put some light on this, please.

Dit you managed to get this working?