You are here:
Create an Object State Action Definition using an Apex Class
To create custom action buttons, create object state action definitions that are associated with Apex classes. Configure the associated Apex class in the Developer Console before creating an object state action definition.
| User Permissions Needed | |
|---|---|
| To define, edit, delete, set security, and set version settings for Apex classes: | Author Apex |
| To run Apex tests: | View Setup and Configuration |
- From the App Launcher, find and select Object State Action Definition.
- Click New.
- Enter these details:
-
API Name: A unique API name. For example, DraftToSigned.
-
Name: The button display name.
-
Invocable Class Name: The name of the Apex invocable class you created.
-
Invocable Method Name: The name of the Apex invocable class method. For example, executeAction.
-
Action Type: Apex
The action type for the object state action definition: Apex or Reference Object.
-
Reference Object: The Reference Object associated with the Object State Action Definition.
-
- Save your changes.

