How to avoid before update trigger on contact getting executed when its account getting deleted
How to avoid before update trigger on contact getting executed when its secondary accounts are getting deleted
We have a before update trigger on Contact object which will be triggered when there an update to the contact.
However we want to avoid this trigger being executed while deleting secondary Account of a Contact, as it is throwing error we kept inside the trigger when certain conditions aren't met.
And we are not able to delete the secondary Accounts of the Contact.
E.g; Account XYZ is primary Account for Contact A. Contact A is added to contact list for Account ABC. When we try to delete the Account ABC(Secondary Account for Contact A), before update trigger on Contact is getting executed. We want to avoid this trigger execution.