Newer Version Available
RecordAction
Supported Calls
create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), undelete(), update(), upsert()
Fields
| Field | Details |
|---|---|
| ActionDefinition |
|
| FlowDefinition |
|
| FlowInterviewId |
|
| IsMandatory |
|
| Order |
|
| Pinned |
|
| RecordId |
|
| Status |
|
Usage
The RecordAction object works with the Guided Action List component in Lightning Experience. Although this junction object can be used to create relationships between records and flows in Salesforce Classic, those relationships can’t be displayed in Salesforce Classic.
When a flow 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. When a flow is completed, the associated RecordAction object is also deleted.
If you’re using the Guided Action List component to display RecordActions, the deleted RecordActions are removed from the list when the page is refreshed.
For more information about the Guided Action List 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