November 2023
Intermediate to advanced
394 pages
10h 14m
English
The first of the asynchronous Apex options we have are future methods. Future methods are a form of function as a service that Salesforce provides. These methods enable you to execute some code in a fire-and-forget manner. In this paradigm, a function is called for execution (firing) and placed in a queue to be processed when resources are available (forget). Salesforce will execute future method calls when resources are available on the Salesforce servers. In my experience, this tends to be near-instant unless you are performing a large volume of asynchronous processes.
In this chapter, we are going to discuss how to use future methods, some common use cases, and how to test them appropriately. As part of this discussion, ...