function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KaityKaity 

System.trigger.new and Trigger.new

Hi,

 

Is there any difference in:  between System.trigger.new and Trigger.new

 

-Kaity.

Sandeep001Sandeep001

Hello Kaity, 

 

I think System namespace is the default namespace in apex. So System.Trigger.new or Trigger.new are both equivalent.

ryanjuptonryanjupton

They're the same thing.

Team WorksTeam Works

Trigger Context variables are contained in theSystem.Triggerclass....All triggers define implicit variables(Context variables) that allow developers to access runtime context..

Syste,trigger.new is same as trigger.new

 

Hit Kudos!!:)

Amith RaoAmith Rao
Example:-
for(Lead Led:System.Trigger.new)   

is same as using

for(Lead Led: Trigger.New)