Salesforce Asynchronous Apex

1. Future Method
We can avoid Mixed DML issue by running two different transactions. Call outs to the external Web Services can be executed asynchronously.

2. Batch Apex
Mainly used for large data volumes. It supports millions of data to be processed.

https://www.infallibletechie.com/2012/05/batch-apex.html

3. Queueable Apex
Similar to Future Method. It supports non-primitive data types while passing values to the method. Biggest advantage is chaining jobs.

https://www.infallibletechie.com/2016/08/queueable-apex.html

4. Schedulable Apex
Run the Apex class as per the schedule(CronTrigger).

Leave a Reply