Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Aura Component Continuations Example

Here’s the markup for a component with a button that starts the process of calling a continuation.

The component is wired to the Apex class that uses a continuation by setting the controller attribute in the <aura:component> tag.

Here’s the component’s JavaScript controller. The code calls the startRequest Apex method that uses a Continuation object. The response.getReturnValue() value for a successful response in the JavScript controller corresponds to the value returned by the Apex callback method defined in the Continuation object.

This JavaScript controller code is similar to any other component that calls an Apex method.