Skip to main content
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

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.

To define a future method, simply annotate it with the future annotation.

global class FutureClass
    public static void myFutureMethod()
         // Perform some operations

Methods with the future annotation must be static methods, and can only return a void type. The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types. Methods with the future annotation cannot take sObjects or objects as arguments.

Methods with the future annotation have the following limits:

  • No more than 50 method calls per Apex invocation in synchronous context
  • No more than 0 in batch and future contexts; 1 in queueable context method calls per Apex invocation
  • The maximum number of future method invocations per a 24-hour period is 250,000 or the number of user licenses in your organization multiplied by 200, whichever is greater. This is an organization-wide limit and is shared with all other asynchronous Apex: batch Apex and scheduled Apex.

Useful Documentation