You need to sign in to do that
Don't have an account?
Teach_me_how
How to avoid campaign trigger when deleting campaign member?
I believe deleting campaign member will call the trigger on campaign because of roll up for "NumberOfContacts" but i want to avoid my custom trigger ? what is the workaround for this?
Sure the trigger will fire beacuse of change in related list and change in rollup . if you add the below logic in starting of the trigger
if(Trigger.New[0].total_number_of_contacts__c ==trigger.old[0].total_number_of_contacts__c)
{
//// all the trigger logic
}
that will not cause the trigger to perform any action whn there will be a change in "NumberOfContacts".
Not very sure if we are able to stop execution on the trigger . hope this hepls .......
NumberOfContacts is standard field from salesforce . The weird part is when i delete campaignmeber then check the value of NumberOfContacts both old and new always has same value so i cannot define if condition in my trigger
in case of standard field ,Trigger will not get fire . check in your debug log then you will be sure .
i have no trigger in campaign member. In user interface i delete 1 campaign member under campaign record. and i see in debug log that it goes to campaign trigger. how to avoid to go to campaign trigger if i only deleting campaign member .
see below debug log