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
RPKRPK 

How to identify which object changed?

Is there any way to detect which object got changed? For example, if I added a new record in Customer, a trigger should fire and return me the newly added field values. It should return to an APEX class?

The problem with trigger is that it is limited to one object. I want to create a global trigger type of something. It should fire anytime a new insert finishes on any object.
GauravendraGauravendra
Hi RPK,

I don't think there is some thing like global trigger. Trigger is specific to single object.
To attain the objective, you can call the same apex class method from every object (before) trigger and pass the 'Trigger.New' as parameter.
So, all the new changes you can get at one place. In that apex method you can manupulate the data accordingly.

Hope this helps.