Aysnchronous Apex
Aysnchronous Apex
Aysnchronous Apex
Connect with me
https://www.linkedin.com/in/ankit-jain-sfdc/
• You can call a future method for executing long-running operations, such as
callouts to external Web services or any operation you’d like to run in its
own thread, on its own time. You can also use future methods to isolate
DML operations on different sObject types to prevent the mixed DML error.
• A benefit of using future methods is that some governor limits are higher,
such as SOQL query limits and heap size limits.
Business Case of Future Method
• When you have a long-running method and need to prevent
delaying an Apex transaction
• }
Queable Apex
• To start a long-running operation and get an ID
for it
• To chain jobs
Queable Code Example
Transaction Finalizers