Loading
Salesforce now sends email only from verified domains. Read More
Help Agent Performance DegradationRead More
Salesforce Contracts
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create an Object State Action Definition using an Apex Class

          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
          1. From the App Launcher, find and select Object State Action Definition.
          2. Click New.
          3. 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.

          4. Save your changes.
           
          Loading
          Salesforce Help | Article