Posts

Showing posts with the label asynchronous class

How to call future(asynchronous class in apex) methods from salesforce apex triggers and not run into governor limits

  Use @future Appropriately      As articulated throughout this article, it is critical to write your Apex code to efficiently handle bulk or many records at a time. This is also true for asynchronous Apex methods (those annotated with the @future keyword).           Even though Apex written within an asynchronous method gets its own independent set of higher governor limits, it still has governor limits. Additionally, no more than ten @future methods can be invoked within a single Apex transaction. ·     Here is a list of governor limits specific to the @future annotation: ·     No more than 10 method calls per Apex invocation ·     No more than 200 method calls per Salesforce license per 24 hours. ·     The parameters specified must be primitive dataypes, arrays of primitive  datatypes, or collections of primitive datatypes. · ...