+ Start a Discussion
TheRealistTheRealist 

Does Trigger,new works for after events like After insert and After update

Best Answer chosen by TheRealist
ManojjenaManojjena
Hi TheRealist,

Vivek is right ,You can check the below link there is a small example in which context which context variable are available .Just copy paste the code in your org and try to insert and update delete an dundelete from rcycle bin and check the debug log and differentiate and realize 

http://manojjena20.blogspot.in/2013/03/manojs-trigger-blog.html

Let us know if it helpful.

Thanks 
Manoj

All Answers

Vivek DeshmaneVivek Deshmane
Hi TheRealist,

Trigger.new will hold current values of records  and these values will be availbale in after insert and after update trigger however Trigger.new collection values will be in readonly format in after trigger event.

Please refer below link for more detail.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers.htm

If you get the answer, please mark it as the correct answer. It will be a help to others who are facing the same problem later.

Best Regards,
-Vivek
ManojjenaManojjena
Hi TheRealist,

Vivek is right ,You can check the below link there is a small example in which context which context variable are available .Just copy paste the code in your org and try to insert and update delete an dundelete from rcycle bin and check the debug log and differentiate and realize 

http://manojjena20.blogspot.in/2013/03/manojs-trigger-blog.html

Let us know if it helpful.

Thanks 
Manoj
This was selected as the best answer