Path to Code
Begin Your Salesforce Coding Adventure
Episode 18
Asynchronous Apex – Future, Queueable
Salesforce MVP, Founder of ApexHours
Follow me at @Amit_SFDC @ApexHours
Amit
Chaudhary
Agenda
• What is Asynchronous Apex
• Why Asynchronous Apex
• Different way of Asynchronous Apex
• Future Vs Queueable
Some House Rules
• Mute your mic
• Keep adding questions in Zoom Q&A Window
• No question is too small
• Questions will be answered in last 15 mins
What is Asynchronous Apex
Why Asynchronous Apex
1. For higher Governor limits
2. Mixed DML operation
3. Long Running job
4. Make a callout from Trigger
Governors Limits
Description Synchronous Limit Asynchronous Limit
Total number of SOQL queries issued 100 200
Total heap size 6 MB 12 MB
Maximum CPU time on the Salesforce servers5 10,000 milliseconds 60,000 milliseconds
Different Way of Asynchronous Apex
Future Method Queueable Apex Batch Job Scheduled Apex
Future Vs Queueable
Future
1. Easy to implements
2. Only accept primitive type
arguments (Integer, String ,
etc, Collection of primitive)
3. Can’t chain jobs
4. Hard to monitor
Queueable
1. Need to create one apex class
2. Support sObject
3. Ability to chain jobs
4. Can be monitored
Demo
Trailhead Modules
Asynchronous Apex
Thank You
Subscribe

Episode 18 - Asynchronous Apex