Monday, July 30, 2018

Future Vs Queueable Apex in Salesforce Explained

Future method:

1. We can only pass Primitive data types as parameters
2. We cannot chain @future methods
3. We cannot access Job Ids
4. Function prototype = public static void methodName (parameters)
5. @future annotation is used

Queueable:


1. Unlike future method, we can also pass non-primitive data types as parameters
2. We can chain jobs
3. We can monitor jobs by retrieving Job Ids
4. Function prototype = public void execute(parameters)
5. Implements Queueable interface.

No comments:

Post a Comment

Governor Limits Example-Too Many DML Statements :151

Governor Limits Example : Too Many DML Statements :151 (Sunil Sharma) Example:Code Hitting Governor Limits System.LimitExceptio...