An object should not have more than one trigger.

The trigger should have one job.

If you have multiple triggers on an object, it can be confusing to determine which trigger will fire first. This can lead to unexpected and surprising results, and we all hate surprises when our code runs.

Multiple triggers may also duplicate effects or cause other bugs.

Instead, have the trigger kick off one job, and then have that job call everything else in the order you desire. This leads to a much more predictable outcome.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: