View definition-specific invocable actions in Salesforce Flow by generating Apex classes from your context definitions. The Apex classes mirror the metadata and hierarchy of your context definition, which can be used directly in Salesforce Flow without any coding required.
Required Editions
| Available in: Lightning Experience |
| Available in: Developer, Enterprise, Professional, and Unlimited editions for Industries clouds where Context Service is enabled |
| User Permissions Needed | |
|---|---|
| To generate Apex classes: | Context Service Admin |
| To create a flow: | Manage Flow |
| To invoke context service actions: |
Context Service Admin OR Context Service Runtime |
-
From Setup, in the Quick Find box, enter
Context Service, then select Context Definitions. - Select the context definition for which you want to generate an Apex class.
- Click Generate Apex Class.
-
To view the generated Apex classes
-
From Setup, in the Quick Find box, enter
Apex Class, then select Apex Class. - Search for the API name of your context definition.
-
From Setup, in the Quick Find box, enter
Once an Apex class is generated, it can’t be edited. To delete an Apex class, go to the context definition page and click Delete Apex Class.
Important Deleting Apex classes can break Flows that use them. Make sure to remove the
associated classes from all your Flow elements.
To refresh the Apex classes of a context definition you have edited, go to the context definition page and click Refresh Apex Class.
Important When a custom context
definition is updated, the associated Apex classes are not automatically updated. You must
manually refresh the Apex classes.