Ads

Monday 15 April 2013

When to use before and after trigger in Salesforce?

Before Trigger:
In case of validation check in the same object.
Insert or update the same object.

After Trigger: 
Insert/Update related object, not the same object.
Notification email.
We cannot use After trigger, if we want to update a record because it causes read only error. This is because after inserting or updating, we cannot update a record.

No comments:

Post a Comment