QuickActionRequest Class

Use the QuickAction.QuickActionRequest class for providing action information for quick actions to be performed by QuickAction class methods. Action information includes the action name, context record ID, and record.

QuickAction

For Apex saved using Salesforce API version 28.0, a parent ID is associated with the QuickActionRequest instead of the context ID.

The constructor of this class takes no arguments:

In this sample, a new quick action is created to create a contact and assign a record to it.

See Also

The following are constructors for QuickActionRequest.

Creates a new instance of the QuickAction.QuickActionRequest class.

public QuickActionRequest()

The following are methods for QuickActionRequest. All are instance methods.

Returns this QuickAction’s context record ID.

public Id getContextId()

Type: ID

Returns this QuickAction’s name.

public String getQuickActionName()

Type: String

Returns the QuickAction’s associated record.

public SObject getRecord()

Type: sObject

Sets this QuickAction’s context ID. Returned by getContextId.

public Void setContextId(Id contextId)

  • contextId:

    Type: ID

Type: Void

For Apex saved using Salesforce API version 28.0, sets this QuickAction’s parent ID and is returned by getParentId.

Sets this QuickAction’s name. Returned by getQuickActionName.

public Void setQuickActionName(String name)

Type: Void

Sets a record for this QuickAction. Returned by getRecord.

public Void setRecord(SObject record)

Type: Void