Newer Version Available
RecordAction
Supported Calls
create(), delete(), , describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()
Special Access Rules
As of Summer ’20 and later, only authenticated internal and external users can access this object.
Fields
| Field | Details |
|---|---|
| ActionDefinition |
|
| ActionType |
|
| FlowDefinition |
|
| FlowInterviewId |
|
| IsMandatory |
|
| IsUiRemoveHidden |
|
| Order |
|
| Pinned |
|
| RecordId |
|
| Status |
|
Usage
The RecordAction object works with the Actions & Recommendations component in Lightning Experience. Although this junction object can be used to create relationships between records and actions in Salesforce Classic, those relationships can’t be displayed in Salesforce Classic.
When an action is deleted that’s referenced in an ActionDefinition or FlowDefinition, the RecordAction object is deleted. RecordAction objects are also deleted when the associated parent record is deleted, or when a flow is paused and the current record context has changed. When an action is completed, the associated RecordAction object is also deleted.
Deleted RecordActions are removed from the list when the page is refreshed.
For more information about the Actions & Recommendations component and how it works with RecordActions, see the Lightning Flow for Service Developer Guide.
Java Example
1public void associateNewCustomerFlowWithAccount(Account a) {
2 try {
3 RecordAction newRecordAction = new RecordAction();
4 newRecordAction.setRecordId(a.getId());
5 newRecordAction.setActionDefinition(“New_Customer_Flow”);
6 newRecordAction.setOrder(1);
7
8 SaveResult[] results = connection
9 .create(new SObject[] { newRecordAction });
10 } catch (ConnectionException ce) {
11 ce.printStackTrace();
12 }
13}Data Model
Associated Objects
This object has the following associated objects. Unless noted, they are available in the same API version as this object.
- RecordActionHistory
- History is available for tracked fields of the object.