function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
richardc_rsvprichardc_rsvp 

Will deletion of a contact in a campaign fire a campaign member delete trigger?

Our app includes a trigger Add_Update_Delete_CampaignMember_Trigger on CampaignMember (after insert, after delete).  It works fine when a camapign member is deleted.  However, when the contact in the campaign is deleted, which also deletes their campaign membership(s), the trigger does not fire.  Is this considered a cascading delete?

 

Does anyone have any ideas for a work around?

Rahul SharmaRahul Sharma

Hi richardc_rsvp,

 

What you can do is to write trigger on parent object (on before delete event) and it will have same logic of parent.
It will simpy search all the child records and perform operation as needed.

LorenzoLorenzo
can you explain me how to delete campaign members with contact/lead associated to a completed or aborted Campaign?