Row Actions

Row Actions in AGrid aim to enhance productivity from a list view and automate business rules by minimizing the number of clicks needed to perform an action. Users can conveniently execute actions at the row level in the list view as Row Actions. This feature is divided into two types: Custom Actions and Standard Actions.

Standard Row Actions

Standard (Built-in) Actions are the predefined actions that come built-in with AGrid, providing essential functionalities for records at the row level. Here's what users need to know:

  • Standard Actions include fundamental actions such as edit, delete, and view.

  • These actions are readily available, providing users with quick and straightforward ways to manage records within List View.

Standard Row Action Section Details-20240227-141038.png
Row Action - Standard Section Details

View

Enable this row action to allow the end-users to view the record by redirecting them to the Salesforce record detail page.

Edit

Enable this row action to allow end-users to edit an individual record. Upon clicking this action, the default salesforce window pops up and you can edit the details

Delete

Enable this row action to allow end-users to delete that record upon getting a confirmation from the user.

Custom Row Actions

Custom Actions in AGrid empower users to create personalized actions tailored to their specific needs within List View. Here's a detailed breakdown:

  • Users can create custom actions and can edit, delete, and clone them as needed.

  • These actions are entirely customizable, allowing users to shape their AGrid List View experience according to their workflow requirements.

  • Users can implement a variety of actions, expanding beyond the standard functionalities provided by AGrid.

Custom Action Section Details-20240227-141846.png
Row Action - Custom Section Details

How to create a custom Action

Understanding Action Properties on the AGrid Configuration page:

  1. Action Name:
    The distinct name is assigned to the custom Row Action for easy identification.

  2. Display As:
    The user's choice of display, whether as a Button, Link, or Icon, enhances the visual representation.

  3. Action Types:
    Row Actions in AGrid support various distinct Action Types, each designed for a specific purpose. While most actions require passing values, a few do not necessitate it.

Adding Row Action in AGrid List view

Adding Row Action in the AGrid List view is not just about creating the action; you also need to include them as actions under the Columns tab.

Here's how:

  • Under the Columns tab, scroll to the bottom and click on "Add Action."

  • Add the Order number, then select the Action you want to add and label it. You can even select multiple Actions in the same row.

  • Choose how to "Show As" from two options – Default and the Menu Icon. You can also choose to promote the action in the header.

Row Action Types

Launch an AGrid

Users often find themselves spending excessive time navigating through Salesforce records to perform actions, impacting productivity. By integrating AGrid as a Row action within another AGrid List View, users can seamlessly access related records and streamline their workflow.

This setup can also be extended to the homepage or specific app pages for enhanced.

  • When selecting this as an action type, you'll see the Configuration Name label, showcasing all available configurations.

  • The "Use As" option determines whether to display the configuration as a List or Related List:
    a. List: Displays the configuration as a standalone list.
    b. Related List: Shows the configuration based on the Parent Field Name.
    c. For Intelligent Related Lists, specify the Intelligent Related List Name to render the list based on given conditions.

  • Afterward, set how to "Display As" from the two options – Table view or Card view.

  • You can also manage whether to "Hide Header" or "Hide Selection" with the provided checkboxes.

Launch an AGrid Group

Companies often handle intricate data and its numerous associated records in Salesforce. AGrid Group, as an action row type, offers a practical solution to simplify the management of these interconnected datasets. Users can easily access and analyze related list views directly within the main AGrid interface, streamlining their workflow. This action enables the launch of an AGrid Group directly from the AGrid List View.

  • Selecting this action will display the Configuration Group Name label, listing all available Configuration Groups.

  • Launching an AGrid Group does not require passing any variables or setting a Record Id.

  • Next, you can set the "View Type" from three options – Tab, Accordion, and Dropdown.

  • Additionally, you can manage whether to "Hide Header" with a toggle button.

Launch a Flow

Users often need to quickly run flows to update some fields or run an action without navigating to different pages. With the 'Launch a Flow' feature in AGrid, your team can initiate predefined workflows directly from the list view. This action seamlessly initiates the execution of Flows right from the AGrid Row Action.

  • Choosing "Launch Flow" as an Action Type displays the Flow label, listing all available Flows in the organization.

  • Select one from the active flows. If the flow requires adding a variable, you'll see an "Add variable" button.

  • Under Variables, select the name from the listed variables. You can either display the type of variable or choose one.

  • Similarly, for the "Is Collection" checkbox, you can either display the type or select.

  • Finally, you can set the value, which may also be a Global variable. Users can pass values to actions using two methods:
    a. Value: Directly enter a value for the action variable.
    b. Global Variable: Utilize Global Variables to select values in two ways:
    AGrid: Pass values such as Intelligent Filter Api Name, Parent Field Name, Parent Id, Record Id, and SObject.
    c. Intelligent Filter Api Name: Pass the unique name of the Intelligent Related List defined in the Intelligent Related List API Name in Lightning App Builder.
    d. Parent Field Name: Pass the Name defined in the Parent Field Name in Lightning App Builder.
    e. Parent ID: Pass the Record ID of the current record detail page to actions.
    f. Record Id: Pass the ID of the selected record in AGrid List View to actions.
    SObject: Pass the current record context value of the selected object in Configuration.

How to Pass RecordId from AGrid to Flow

Passing the RecordId from AGrid to a Flow involves creating a variable in Flow and configuring the Row Action in AGrid. Follow these steps for seamless integration:

  1. Create Variable in Flow:
    a. In your Flow, create a variable named "RecordID."
    b. Save your changes in the Flow.

  2. Navigate to Row Action in Configuration:
    a. On the Configuration Page, go to the "Row Action" tab.

  3. Select Flow:
    a. Choose the specific Flow that you want to pass the RecordId to.

  4. Assign Value to Action Variable:
    a. In the "Action" section, assign a value to the Action variable.
    b. Toggle between entering a value directly or using a global variable.

  1. Map RecordId:
    a. In the "Source Side" dropdown, select the "recordId" created in the Flow variable.
    b. In the "Target Side" dropdown, traverse from "AGrid->Record Id."

  2. Save Changes:
    a. Save your changes in the Row Action configuration.

  3. Test the Functionality:
    a. Test the functionality by selecting a row in your AGrid and triggering the associated Flow.
    b. Verify that the RecordId value is passed to your custom variable and displayed on your Flow screen.

  4. Repeat for Other Variables:
    a. Follow the same procedure for ParentId, Parent Field Name, and Intelligent Filter Api Name to pass values to the Flow.

Note: Ensure that the Flow variable names match the ones used in the Row Action configuration for accurate mapping.

Launch a Lightning Component

Lightning Components are reusable building blocks for creating Salesforce applications, providing dynamic and interactive user experiences. With the "Launch a Lightning Component" as an Action type feature in AGrid, users can conveniently trigger these components directly within the list view interface.

  • Choosing this action unveils the Lightning Component label, presenting all Lightning Components available in the organization.

  • Upon selecting the Lightning Component, you can “Add variables”.

How to Pass RecordId from AGrid to Lightning Component

To pass the RecordId from AGrid to a Lightning Component, follow these developer-friendly steps. This process involves modifying or creating a new Lightning Component and configuring the Row Action in AGrid.

  1. Create or Open Lightning Component:
    a. In your preferred code editor, create a new Lightning Component or open an existing one for modification.

  2. Declare Variable in Lightning Component:
    a. Inside the Lightning Component's markup file (.cmp), declare a new attribute with the name and type properties for your variable. For example, declare a string variable called "recordId."

  1. Navigate to Row Action in Configuration:
    a. On the Configuration Page, go to the "Row Action" tab.

  2. Select Lightning Component:
    a. Choose the specific Lightning Component that you want to pass the RecordId to.

  3. Assign Value to Action Variable:
    a. In the "Action" section, assign a value to the Action variable.
    b. Toggle between entering a value directly or using a global variable.

  4. Map RecordId:
    a. In the "Source Side" dropdown, select the "recordId" created in the Lightning Component.
    b. In the "Target Side" dropdown, traverse from "AGrid->Record Id."

  5. Save Changes:
    a. Save your changes in the Row Action configuration.

  6. Test the Functionality:
    a. Test the functionality by selecting a row in your AGrid.
    b. Verify that the RecordId value is passed to your custom variable and displayed on your Lightning Component.

  7. Repeat for Other Variables:
    a. Follow the same procedure for ParentId, Parent Field Name, and Intelligent Filter Api Name to pass values to the Lightning Component.

 Note: Ensure that the Lightning Component variable names match the ones used in the Row Action configuration for accurate mapping.

Launch a Lightning Web Component

Imagine a scenario where end-users of a sales team need to access and review important documents related to opportunities directly from the list view in Salesforce. With the "Launch a Lightning Web Component" feature in AGrid, users can initiate Lightning Web Components designed for document management directly from the list view. This could allow the end users to perform more actions as a part of that Lighting web component like quickly view, upload, or manage documents associated with opportunities without navigating to separate pages. 

  • Initiates the launch of Lightning Web Components from the AGrid List View.

  • Selection prompts users to enter the name of the target Lightning Web Component in the Lightning Web Component input.

  • Upon selecting the Lightning Web Component, you can “Add variables”.

Passing RecordId from AGrid to Lightning Web Component

To pass the RecordId from AGrid to a Lightning Web Component, follow these steps. This process involves modifying the Lightning Web Component and configuring the Row Action in AGrid.

  1. Declare Variable in Lightning Web Component:
    a. Inside the Lightning Web Component's markup file (.html), declare a new public attribute with the name for your variable. For example, declare a string variable called "recordId."

  1. Navigate to Row Action in Configuration:
    a. On the Configuration Page, go to the "Row Action" tab.

  2. Select Lightning Web Component:
    a. Choose the specific Lightning Web Component that you want to pass the RecordId to.

  3. Assign Value to Action Variable:
    a. In the "Action" section, assign a value to the Action variable.
    b. Toggle between entering a value directly or using a global variable.

  4. Map RecordId:
    a. In the "Source Side" dropdown, select "recordId" created in the Lightning Web Component.
    b. In the "Target Side" dropdown, traverse from "AGrid->Record Id."

  5. Save Changes:
    a. Save your changes in the Row Action configuration.

  6. Test the Functionality:
    a. Test the functionality by selecting a row in your AGrid.
    b. Verify that the RecordId value is passed to your custom variable and displayed on your Lightning Web Component.

  7. Repeat for Other Variables:
    a. Follow the same procedure for ParentId, Parent Field Name, and Intelligent Filter Api Name to pass values to the Lightning Web Component.

 Note: Ensure that the Lightning Web Component variable names match the ones used in the Row Action configuration for accurate mapping.