How to customize actions using Advanced settings in XRL
Leverage Orenda Grids XRL to create a customize action settings with callback, show/hide functions in XRL, enabling you to personalize and enhance your user experience with the software.
Introduction
The Salesforce Orenda Grids Extended Related List Actions tab allows you to perform various actions on the records displayed in the related list. In addition to customizing column and row level settings, you can harness the power of advanced action settings in XRL to enhance the interactivity and functionality of Related List configurations. This article will guide you through the process of utilizing JSON code snippets for advanced action settings, with examples of callback functions, show/hide functionality, and more.
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. Before diving into advanced action settings, ensure you have a basic understanding of XRL customization and familiarity with JSON code. Users should be comfortable configuring XRL settings and have the necessary permissions as XRL Power users. |
Which type of user can add a new action in records?
Only the Power users in XRL can create and customize the default and custom actions. However, all the users with XRL permission set can manipulate the data using the configured actions in the Extended Related List Grid or XRL in Salesforce.
Procedure
We will take example of Cases XRL to walk you through advanced action settings in XRL view.
Step 1: In the Cases XRL view, go to upper right corner and click on gear icon and select Configure.
Step 2: In the configuration wizard, select the Action tab from the options in top.
Step 3: In the Actions tab, select the action in the dropdown that you want to customize.
Step 4: Click on the Advanced Section option in the customization settings as shown.
Advanced Action Settings
Step 5: In the input box of Advanced section, write the desired JSON code. See the code example code snippet below.
{
"outputFormat":"JSON", //applicable only for EXPORT action
"actionShowHideCallback": function(scope,libs,records){
return false;
}
"actionCallBack":function(scope,libs,selectedRecords){
}
}
1. Callback Functions:
{
"outputFormat": "JSON",
"actionCallBack": function(scope, libs, selectedRecords) {
// Implement custom logic based on selected records
// This function is triggered when an action is performed on the Related List
}
}
Explanation:
- The actionCallBack function allows you to define custom actions when interacting with records in the Related List.
- scope, libs, and selectedRecords are parameters that provide context and information about the action.
2. Show/Hide Functionality:
{
"outputFormat": "JSON",
"actionShowHideCallback": function(scope, libs, records) {
// Implement logic to show or hide specific elements in the Related List
return false; // Returning false hides the specified elements
}
}
Explanation:
- The actionShowHideCallback function enables users to dynamically control the visibility of elements in the Related List based on specified conditions.
- scope, libs, and records are parameters providing context and information about the records.
3. Dynamic Styling for Enhanced Presentation:
{
"outputFormat": "JSON",
"actionCallBack": function(scope, libs, selectedRecords) {
// Implement custom styling logic based on selected records
// This can include changes to text color, background color, and more
}
}
Explanation:
- Users can leverage the actionCallBack function to implement dynamic styling for individual cells or entire rows in the Related List.
- The code within the function can manipulate styling attributes based on the selected records.
4. Conditional Data Filtering:
{
"outputFormat": "JSON",
"actionCallBack": function(scope, libs, selectedRecords) {
// Implement custom logic to filter and display records conditionally
// This can enhance the relevance and focus of data in the Related List
}
}
Explanation:
- The actionCallBack function can be used to selectively display records based on specific conditions, providing intelligent data filtering.
Conclusion
Advanced action settings in Orenda Grids XRL empower Salesforce users to go beyond standard configurations, creating a more tailored, interactive, and visually appealing experience by customizing actions. By leveraging callback functions, show/hide functionality, dynamic styling, and conditional data filtering, users can address specific business needs and enhance the overall effectiveness of Related List views.