Activity Forums Salesforce® Discussions What is the use of Future method in Batch class in Salesforce?

  • What is the use of Future method in Batch class in Salesforce?

    Posted by Pooja on February 22, 2021 at 6:52 am

    What is the use of Future method in Batch class in Salesforce?

    kishan replied 3 years ago 3 Members · 2 Replies
  • 2 Replies
  • Aditya

    Member
    February 22, 2021 at 8:54 am

    A future method runs in the background, asynchronously. 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.

  • kishan

    Member
    March 2, 2021 at 10:48 am

    Hi
    Future Method is one of the options to run asynchronous jobs.We can use future methods for any operation we’d like to run asynchronously in its own thread in the background when system resources become available.Future methods provide higher governor limits.
    Future methods are typically used for:Callout to external web services.(Calling web services from triggers.)
    Operations which you want to run in their own thread.
    Isolating DML operations on different subject types to prevent the mixed DML error.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos