How to create and execute new custom actions in XRL
Learn using custom actions including automated flow and screenflow in XRL
Introduction
The Salesforce Hypergrid Extended Related List Actions tab allows you to perform various actions on the records displayed in the related list. Some of the actions that can be performed include creating a new record, editing an existing record, deleting a record, mass editing records, and exporting data to a CSV file. The actions available may vary depending on your user permissions and the configuration of the related list.
In this article, we will understand how to create a new custom action and define its settings.
Prerequisite XRL view is configured and a view is created on a record page. Refer to the articles below to know how XRL is added to the page view and how to create a Related List view in XRL.
|
Which type of user can add a new action in records?
The Actions functionality is available for all users in the HyperGrid- Standard and Power Users. That is, all users get access to some default actions in XRL view such as delete, reset filter, create new record etc. However, please note that only a Power User can create a new custom action through Actions tab in configuration wizard. To get any new action in their XRL view, Standard users must share their view in Read/write mode with a Power User. Click here to know how to share your XRL views with other users.
Create a new Custom Action
We will work with Cases XRL in an account record- Test Performance to walk you through the steps to customize an action.
Step 1: On the Configuration Wizard, click on the Actions tab and you will see the option to create new action or choose from pre-existing actions.
Step 2: Click on the New Action tab and enter the Unique Action id name such as CustomAction. Click Save.
Step 3: Enter the details of the CustomAction to customize it as explained below.
- Id of the action: This refers to a unique identifier assigned to each action that is created. For default actions, the system generates this identifier and it cannot be changed or modified manually. However, for custom actions like in this example, it can be modified or changed.
- Label of the action: This label is used to identify the action within the user interface. In this example, we are defining it as customAc .
- Tip for the action: The option allows you to add a custom message or tip to an action in the related list. This message will appear as a tooltip when the user hovers over the action button in the related list. This can be useful for providing additional information or guidance to users about the action they are performing. In our example, we are defining it as “A new custom action tip”.
- Hide this action: Select this checkbox to hide the action button from the grid.
-
Action visible only after record selection: This action will be visible only after selecting the record.
- Name of the icon to be shown: This refers to the specific icon that will be displayed on the grid. This icon can be chosen from a library of icons provided by Lightning Design System that can be found at “www.lightningdesignsystem.com/icons/”. By choosing a specific icon, users can add visual cues and distinguish between different types of related records. In this example, we will define it as a utility: answer.
- Order of the action: This property specifies the order in which the actions appear in the related list. It is critical to use appropriate values when configuring this property, such as 10, 20, 30, and so on. This is due to the fact that using sequential values like these allows for greater flexibility, as new actions can be easily added between existing ones without disrupting the order of the entire list.
- API name of the flow: The "API Name of the Flow" field is optional. This field is only used if you want to run a flow when the user clicks the action button. By entering the flow's API Name in this field, you can allow end users to execute that flow when they click the action button in the extended related list. This field is automatically selected to None by default and cannot be modified.
Step 4: Once you have defined all the properties of the action, click Save.
Results
The above procedure results in the Related List view with the new custom action.
Autolaunched flow and Screenflow in XRL
Hypergrid Extended Related List (XRL) Actions offer a powerful way to interact with records displayed within related lists. Users can perform various actions, including creating new records, editing existing ones, deleting records, mass editing, and exporting data to CSV files. The availability of these actions depends on user permissions and related list configurations.
Tip: To learn more about Salesforce Flows Workflow, click here. |
Limitations in Salesforce Related to Flow Execution
One significant limitation in Salesforce is that users often face challenges when they do not have access to flow execution readily available. Salesforce users often rely on custom flows to automate repetitive tasks and streamline processes. However, without an easy and intuitive way to execute these flows directly from the related list view, users must navigate to different parts of the Salesforce interface, making their workflow less efficient and more time-consuming.
This limitation can be a major pain point for users who need quick access to execute flows as part of their daily tasks. It can lead to frustration, decreased productivity, and increased complexity in their Salesforce usage. To address this pain point, we will cover how to create custom actions for Automated Flow Execution and Screenflow Execution in XRL, empowering users to work more efficiently and effectively within the Salesforce platform.
Creating custom Action to invoke Autolaunched flow in XRL
Step 1: On the Configuration Wizard, click on the Actions tab and you will see the option to create new action.
Step 2: Click on the New Action tab and enter the Unique Action id name such as AutoFlow. Click Save.
Step 3: Enter the details of the AutoFlow to customize it as explained below.
- Id of the action: This refers to a unique identifier assigned to each action that is created. For default actions, the system generates this identifier and it cannot be changed or modified manually. However, for custom actions like in this example, it can be modified or changed.
- Label of the action: This label is used to identify the action within the user interface. In this example, we are defining it as Autoflow .
- Tip for the action: The option allows you to add a custom message or tip to an action in the related list. This message will appear as a tooltip when the user hovers over the action button in the related list. This can be useful for providing additional information or guidance to users about the action they are performing. In our example, we are defining it as “This action creates a new autolaunched flow in XRL”.
- Hide this action: Select this checkbox to hide the action button from the grid.
- Action visible only after record selection: This action will be visible only after selecting the record.
- Name of the icon to be shown: This refers to the specific icon that will be displayed on the grid. This icon can be chosen from a library of icons provided by Lightning Design System that can be found at “www.lightningdesignsystem.com/icons/”. By choosing a specific icon, users can add visual cues and distinguish between different types of related records. In this example, we will define it as a utility: answer.
- Order of the action: This property specifies the order in which the actions appear in the related list. It is critical to use appropriate values when configuring this property, such as 10, 20, 30, and so on. This is due to the fact that using sequential values like these allows for greater flexibility, as new actions can be easily added between existing ones without disrupting the order of the entire list.
- API name of the flow: This dropdown shows a list of pre-defined automated flows that can be invoked through XRL. Select any of the Autolaunched flow option as shown below.
Step 4: Once you have defined all the properties of the action, click Save.
Results
Once you save the view, you will be able to see the updated action in the 9 dots Menu option in the Related List View.
Creating Screen Flow Action in XRL
Here, repeat the same process as mentioned in the Autolaunched flow. However, in the drop down, you need to select among the screen flow options such as Flow- CMS or Flow- Create a visit etc. Here, we are using Create a Case workflow in our example.
Results
Following these steps will setup a custom action named Screenflow defined by you on the Related List view.
To run the flow, click on Screenflow action button and following flow will run through XRL:
A new case will be created as shown below. Please note, this new case created through this screenflow is not linked to any account. You will need to manually update the account or contacts for this case.