Activity Forums Salesforce® Discussions Queueable Method and future method in Salesforce

  • Kumar

    January 10, 2017 at 10:54 am

    Hi Vikas,

    If you were exceeding a governor limit in your future method, or if you think a future method requires a higher limit, you can possibly increase the limits for your future method,see Future Methods with Higher Limits.

    Another reason to use future methods instead of queueable is when your functionality is sometimes executed synchronously, and sometimes asynchronously. It’s much easier to refactor a method in this manner than converting to a queueable class. This is handy when you discover that part of your existing code needs to be moved to async execution. You can simply create a similar future method that wraps your synchronous method like so:

    static void myFutureMethod(List<String> params) {
    // call synchronous method

    Hope this helps.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos