This chapter describes in detail the different mechanisms for invoking Apex code.
Here is an overview of the many ways you can invoke
Apex. You can run
Apex using:
- A code snippet in an anonymous block.
- A trigger invoked for specified events.
- Asynchronous Apex by executing a future method, scheduling an Apex class to run at
specified intervals, or running a batch job.
-
Apex Web Services, which allow exposing your methods via SOAP and
REST Web services.
-
Apex Email Service to process inbound email.
-
Visualforce controllers, which contain logic in Apex for Visualforce pages.
- The Ajax toolkit to invoke Web service methods implemented in Apex.