So I have this apex trigger I wrote which is working just fine. I am currently experiencing a very weird issue where the Trigger does not work if the Campaign where the campaign members are from has a parent campaign.
My child campaign has the exact same conditions as the parent campaign, including the available options for member statuses but the trigger is not firing at all when I apply updates to its campaign members.
So to be as clear as possible, let's say I have two campaigns. one is the parent of the other:
-ParentCampaign -ChildCampaign
So even tho both campaigns have the exact same conditions the trigger does not fire at all for campaign members from the ChildCampaign.
Here is my trigger:
trigger MyTrigger on CampaignMember (after insert, before update, after update) {
ParentChildHandler handler = new ParentChildHandler();
if (Trigger.isUpdate){
if(Trigger.isAfter){
handler.inheritMemberStatus(trigger.new);
}
}
}