Activity Forums Salesforce® Discussions Explain few considerations for Future annotation in Apex in Salesforce?

  • Somendra

    Member
    August 22, 2019 at 4:23 am

    1) Methods with the future annotation must be static methods
    2) can only return a void type
    3) The specified parameters must be primitive data types, arrays of primitive data types, or collections of primitive data types
    4) Methods with the future annotation cannot take sObjects or objects as arguments.
    5) You can invoke future methods the same way you invoke any other method. However, a future method can’t invoke another future method
    6) No more than 50 method calls per Apex invocation
    7) Asynchronous calls, such as @future or executeBatch, called in a startTest, stopTest block, do not count against your limits for the number of queued jobs
    8) 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

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos