Newer Version Available

This content describes an older version of this product. View Latest

Action Class

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

Namespace

Invocable

Action Methods

These methods are for Action.

addInvocation()

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

Signature

public Invocable.Action addInvocation()

Return Value

Type: Invocable.Action

clearInvocations()

Clears the existing invocations from the action.

Signature

public Invocable.Action clearInvocations()

Return Value

Type: Invocable.Action

clone()

Creates a copy of the Invocable.Action.

Signature

public Object clone()

Return Value

Type: Object

createCustomAction(type, namespace, name)

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

Signature

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

Parameters

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.

Return Value

Type: Invocable.Action

createCustomAction(type, name)

Creates a wrapper for a custom invocable action.

Signature

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

Parameters

type
Type: String
Type of invocable action.
name
Type: String
Name for the custom invocable action.

Return Value

Type: Invocable.Action

createStandardAction(type)

Creates a wrapper for a standard invocable action.

Signature

public static Invocable.Action createStandardAction(String type)

Parameters

type
Type: String
Type of invocable action.

Return Value

Type: Invocable.Action

getName()

Gets the name of an invocable action.

Signature

public String getName()

Return Value

Type: String

Name of the invocable action.

getNamespace()

Gets the namespace of a custom invocable action.

Signature

public String getNamespace()

Return Value

Type: String

Namespace of the custom invocable action.

getType()

Gets the type of an invocable action.

Signature

public String getType()

Return Value

Type: String

Type of invocable action.

invoke()

Invokes an invocable action from Apex code.

Signature

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

Return Value

Type: List<Invocable.Action.Result>

isStandard()

Determines whether an invocable action is a standard invocable action.

Signature

public Boolean isStandard()

Return Value

Type: Boolean

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

setInvocationParameter(parameterName, parameterValue)

Sets a value for an invocable action parameter.

Signature

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

Parameters

parameterName
Type: String
Name of the invocable action parameter to set.
parameterValue
Type: Object
Value to set the invocable action parameter to.

Return Value

Type: Invocable.Action

setInvocations(invocations)

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

Signature

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

Parameters

invocations
Type: List<Map<String,ANY>>
List of invocations for the invocable action.

Return Value

Type: Invocable.Action