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.
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.QuickActionRequestclass.
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.
-
Returns this QuickAction’s name.
-
Returns the QuickAction’s associated record.
-
Sets this QuickAction’s context ID. Returned by
getContextId. -
Sets this QuickAction’s name. Returned by
getQuickActionName. -
Sets a record for this QuickAction. Returned by
getRecord.
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)
-
name:
Type: String
Type: Void
Sets a record for this QuickAction. Returned by getRecord.
public Void setRecord(SObject record)
-
record:
Type: sObject
Type: Void