Action Class

Contains methods to create, update, and retrieve information about invocable actions.

Invocable

The getDescribe() method returns detailed metadata about an invocable action, including its inputs, outputs, and configuration. Because this method retrieves comprehensive describe information, it can have performance implications. Use getDescribe() judiciously, especially in performance-sensitive contexts such as loops or frequently executed code paths.

When calling createStandardAction() or createCustomAction(), the version parameter is optional. If you don’t specify a version, the base version of the action is used.

See Also

These methods are for Action.

Creates an empty invocation in preparation for calling an invocable action. After you create the invocation, you can add parameters to the invocation.

public Invocable.Action addInvocation()

Type: Invocable.Action

Clears the existing invocations from the action.

public Invocable.Action clearInvocations()

Type: Invocable.Action

Creates a copy of the Invocable.Action.

public Object clone()

Type: Object

Creates a wrapper for the specified version of a custom invocable action in a specified package namespace.

public static Invocable.Action createCustomAction(String type, String namespace, String name, String version)

  • type:

    Type: String

    Type of invocable action.

  • namespace:

    Type: String

    Namespace where the invocable action is located.

  • name:

    Type: String

    Name for the custom invocable action.

  • version:

    Type: String

    Version of the invocable action.

Type: Invocable.Action

Creates a wrapper for a custom invocable action in a specified package namespace.

public static Invocable.Action createCustomAction(String type, String namespace, String name)

  • type:

    Type: String

    Type of invocable action.

  • namespace:

    Type: String

    Namespace where the invocable action is located.

  • name:

    Type: String

    Name

    for the custom invocable action.

Type: Invocable.Action

Creates a wrapper for a custom invocable action.

public static Invocable.Action createCustomAction(String type, String name)

  • type:

    Type: String

    Type of invocable action.

  • name:

    Type: String

    Name

    for the custom invocable action.

Type: Invocable.Action

Creates a wrapper for a standard invocable action.

public static Invocable.Action createStandardAction(String type, String version)

  • type:

    Type: String

    Type of invocable action.

  • version:

    Type: String

    Version of the invocable action.

Type: Invocable.Action

Creates a wrapper for a standard invocable action.

public static Invocable.Action createStandardAction(String type)

  • type:

    Type: String

    Type of invocable action.

Type: Invocable.Action

Gets metadata related to an invocable action.

public List<Invocable.Action.DescribeResult> getDescribe()

Type: List<Invocable.Action.DescribeResult>

Gets the name of an invocable action.

public String getName()

Type: String

Name of the invocable action.

Gets the namespace of a custom invocable action.

public String getNamespace()

Type: String

Namespace of the custom invocable action.

Gets the type of an invocable action.

public String getType()

Type: String

Type of invocable action.

Gets the version of an invocable action.

public String getVersion()

Type: String

Version of the invocable action.

Invokes an invocable action from Apex code.

public List<Invocable.Action.Result> invoke()

Type: List<Invocable.Action.Result>

Determines whether an invocable action is a standard invocable action.

public Boolean isStandard()

Type: Boolean

This method returns true if the invocable action is a standard invocable action.

Sets a value for an invocable action parameter.

public Invocable.Action setInvocationParameter(String parameterName, Object parameterValue)

  • parameterName:

    Type: String

    Name of the invocable action parameter to set.

  • parameterValue:

    Type: Object

    Value to set the invocable action parameter to.

Type: Invocable.Action

Initializes the invocations for an action from a pre-existing list of invocations.

public Invocable.Action setInvocations(List<Map<String,ANY>> invocations)

  • invocations:

    Type: List<Map<String,ANY>>

    List of invocations for the invocable action.

Type: Invocable.Action