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

After Update trigger
can any one knows , say what is best & real time scenarioas for trigger after update ?
You need to sign in to do that
Don't have an account?
can any one knows , say what is best & real time scenarioas for trigger after update ?
If you would like to work with system generated fields then you have to use the after trigger.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
i want exactly scenario of real time , bacause in interview every time asking ..... kindly say thank u ...............
Use Case 1 - After Triggers
If Account owner is changed, all of its contacts owners should also be changed.
Use Case 2 - Before Triggers
Restrict changing the owner of Account and throw an error if new owner is not part of default Account team.
Please tell me about object relationship. I will give you a scenario.
If this post is helpful please throw Kudos. If this post solves your problem kindly mark it as solution.
Thanks,
Samba
Salesforce generaly excute trigger in two context
1-before data is commited
2- After data is commited.
After trigger is helpful when you are updating some other object record (related), basically when you will have recordid.
I am sharing a good link about trigger , please go through this link,
http://www.iterativelogic.com/salesforce-apex-trigger-best-practices/