Trigger Context Variable:
Context Variables allow developers to access run-time context of any trigger.
These context variables are contained in System.Trigger class.
Types of context variable:
Trigger.new:
trigger ApexTrigger on Account(before insert)
{
for(Account acc: Trigger.new)
{
acc.NumberOfEmployees = 100;
}
}
Note: This sObject list is only available in insert, update & undelete triggers and records can only be modified in before triggers.
Comments
Hello I am so excited I found your blog, I really found you by mistake, while I was searching on Yahoo for something else, Anyhow I am here now
and would just like to say thank you for a fantastic post and a
all round thrilling blog (I also love the theme/design), I don’t have time youtube converters to mp3 read through it all at the minute but I have book-marked it
and also added your RSS feeds, so when I have time I will be back to read much
more, Please do keep up the awesome jo.