Exploring @future annotated methods

The @future annotation (pronounced as at future) is, perhaps, the simplest method of asynchronous code execution on the Salesforce1 platform. The @future, is a method annotation that makes the method run asynchronously at some point in the near future. Generally, this happens quite quickly, but no time guarantees are established annotation methods as @future is fantastically useful, but has a number of caveats and limitations that developers must remain mindful of:

  • Most importantly, methods annotated with @future can only accept primitive parameter types. String, Integer, and so on, are your only options.
  • You cannot chain methods annotated with @future. In other words, an @future annotated method cannot be called ...

Get Mastering Application Development with Force.com now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.