You need to sign in to do that
Don't have an account?

Difference between Before update and After update Triggers
Hi All,
Can some one please explain "why do we need after update trigger when we can do everything in before upadte triger in sales force"
Thans in advance
Praveen.
Can some one please explain "why do we need after update trigger when we can do everything in before upadte triger in sales force"
Thans in advance
Praveen.
Here is some conversation on this topic.
http://stackoverflow.com/questions/3646110/difference-before-and-after-trigger-in-oracle
https://developer.salesforce.com/forums/?id=906F00000008yLuIAI
-Thanks
Ashlekh Gera
The simple answer I have always used is that Before triggers should update the actual record(s) that called the trigger while After triggers should update related objects. Example: A Case is edited and saved, which causes the Case Trigger to make two updates to the Case itself (Before) and add/remove Milestones and Entitlements related to the Case (After).
This a general rule and is not without myriad exceptions, but it tends to keep me out of trouble more often than not.