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
ElectronElectron 

APEX class works for default Object and interface

We can use APEX trigger to achive some function. Could we just use  APEX class withour trigger? 
I know using visualforce to callout APEX class, but could we do it in default interface and defualt object.
 
For example, if we change something on contact, then use APEX class to send E-mail and then do a series update, not the trigger.
Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

You can't have Apex code executed from the standard UI - there's nowhere for you to inject your code into the processing.

 

In this case, a trigger is the correct place for the code, as that is where your code is allowed to take action based on the changes carried out by the user.

All Answers

bob_buzzardbob_buzzard

You can't have Apex code executed from the standard UI - there's nowhere for you to inject your code into the processing.

 

In this case, a trigger is the correct place for the code, as that is where your code is allowed to take action based on the changes carried out by the user.

This was selected as the best answer
ElectronElectron
Thank you for explaining it.