LogoLogo
HomepageYouTube ChannelInstall from the AppExchange
  • Home
  • Dynamic Components
  • Flow Components
  • Experience Components
  • Projects
  • Avonni Projects
  • Dynamic Components
    • View All Tutorial Projects
    • Building Basics Components
      • My Active Opportunities
      • Enhanced Related List
    • Working with Data
      • Related Contacts Card
      • User Activity Report
    • Advanced Layout & Interactions
      • Dynamic Opportunity Viewer
      • Dynamic Tradeshow Campaign Performance Dashboard
      • Vertical Tabs with Reactive Data Table
  • Flow Components
    • Home
    • Navigation & Structure
      • Building Left-Side Vertical Navigation
      • Navigational Screen Flows in Router Mode
    • Data Display & Interaction
      • Advanced related list
      • Bulk Edit on the Data Table
      • Contacts List
      • Dynamic Map
      • Map with Accounts Insights
      • Map with Detailed Information
      • Product Showcase
      • User Activity Report
    • Business Processes & Logic
      • Building a Business Quote
      • Building a Marketing Campaign Calendar
      • Account Management
      • Today's Accounts to Visit
    • Dashboards & Reporting
      • Building Reactive Metrics Dashboards
    • Multimedia
      • Video Playlist
  • Experience Cloud Components
    • Home
    • Building a MapCard
    • Configuring the Avonni Data Table
    • Create an Export To button on the Data Table
    • Show Current User in Profile Card
    • Responsive Layout
Powered by GitBook
LogoLogo

Company

  • About Us
  • Pricing

Policies

  • Privacy Policy
  • Terms of Service
On this page
  • Overview
  • How it works
  • Guided Steps
  • Step 1: Configure the first screen flow
  • Step 2: Set Up the Bulk Edit Screen Flow
  • Step 3: Connect the Two Flows and setup the interaction

Was this helpful?

  1. Flow Components
  2. Data Display & Interaction

Bulk Edit on the Data Table

Last updated 3 months ago

Was this helpful?

Overview

This tutorial will show you how to add a "bulk edit" feature to your Salesforce flows using the . Users can select multiple opportunities in the table and then click a button to edit all of them at once in a separate screen flow.

How it works

This tutorial is pretty straightforward. We have two parts:

  1. Main Screen Flow: This displays the Data Table with all the relevant information.

  2. Bulk Edit Screen Flow: This flow shows only the selected records from the first flow in a special Avonni Data Table that lets users edit multiple records simultaneously.


Guided Steps

Step 1: Configure the first screen flow

1.1: Set Up the Main Data Table

  1. Add the Data Table: Drag and drop the Avonni Data Table component onto your screen.

  2. Connect to your data: Choose the "Query Data Source" option to connect your Salesforce data and the Data Table directly.

  3. Choose your columns: Click the "Add Columns" button in the "Data Mappings" section to select which fields you want to display in your table


1.2: Add a Bulk Edit Button

Now that we've added the data to our Data Table, let's create a button at the top to trigger the bulk edit functionality.

  1. Open Header Settings: Expand the "Header" section in the Data Table properties.

  2. Add the Button: Click on the "Add Actions" button.

  3. Name the Button: Enter a clear label, like "Bulk Edit"


Step 2: Set Up the Bulk Edit Screen Flow

Let's build the second screen flow that will open when users click the "Bulk Edit" button. This flow will let them edit multiple records simultaneously.

Final Output of this second screen flow

2.1: How the Bulk Edit Flow is Built

Here's a quick overview of how we'll structure the bulk edit flow. In the following steps, we'll explain each part in more detail.

2.2: Create a collection variable

First, we need a place to store the IDs of the records the user wants to bulk edit.

  1. Create New Resource: Click the "New Resource" button in the Flow Builder.

  2. Choose Variable: Select "Variable" as the resource type.

  3. Name the Variable: Give it a descriptive name, like "selectedRecordIds".

  4. Set the Data Type: Choose "Text" as the data type.

  5. Allow Multiple Values: Make sure to check the "Allow Multiple Values" box, as we'll be storing multiple record IDs

2.3: Adding the Avonni Apex Action

The first step in our flow is to add the "Join Text Collection" Avonni Action. We need this because the record IDs we get from the main Data Table are separated only by commas. This action will let us add the delimiter ',' between each ID, which is necessary for using them in our dynamic query filter later on. Without this action, we won't be able to create the right syntax for our Data Table query filter.

  • Enter a label

  • For the Source Collection, select the collection variable we created just above.

  • In the Delimiter attribute, enter this ',' as we want to delimiter by the comma.

  • In the Show Advanced Option" section, check "Manually Assign Variables"

2.4: Manually Assign Variable configuration

Next, we need to manually create a variable to store the result of the "Join Text Collection" action. We'll use this variable later in our query to filter the records.

2.5: Build the Query Filter

Now, let's create a formula that will act as a dynamic filter for our bulk edit Data Table. This filter will ensure we only see the records the user selected.

The formula looks like this:

Copy

"Id IN ('" & {!recordIds} & "')" 
  • recordIds is the variable we created earlier to store the output of the Avonni Action.

  • This formula says, "Show me only the records whose ID is included in this list of IDs."

2.6: Add the Data Table for Bulk Editing

Let's add a new screen to your flow and put the Avonni Data Table on it. This Data Table will use a "Query Data Source" to show only the records the user wants to bulk edit.

  • Add the columns you need: Choose the fields you want users to be able to edit and add them as columns in the Data Table

  • For the Query Filter, make sure to map the filter to the formula query filter we created just above

2.7: Data Table Settings adjustments

Make sure to adjust those settings on the Data Table

  • All Columns Settings, check dispaly as input and Editable

  • Toggle the "Hide Checkbox Column" and 'Always Display Bottom Bar"

2.8: Data Table Interactions

Last but not least, add "On Save" interactions on the Bulk Edit Data Table.

  • Add an "Update Records" interaction to make sure the information is saved

  • Add a Finish Flow Navigation interaction to ensure the bulk edit flow dialog box will be closed once your users save the information.


Step 3: Connect the Two Flows and setup the interaction

We need to connect our main flow to the bulk edit flow to make the bulk edit feature work. We'll use the "Interactions" tab to activate the "Bulk Edit" button in the header. Here's how:

  • Return to the first flow we created (the one with the list of opportunities and the "Bulk Edit" button).

  • Add the Interaction: Click the "Add Header Action" button.

  • Choose the Button: Select the "Bulk Edit" button we created earlier as the target.

  • Pick the Action Type: Select "Open Flow Dialog." Clicking the button will open another flow in a pop-up window.

  • Select the Flow: In the "Flow API Name" section, choose the flow you want to open when the button is clicked

  • Name: Enter the same name as the variable you created in the second flow (we'll explain this in Step 2).

  • Value: Select "Selected Record Ids". This will send the IDs of the selected opportunities to the second flow.

  • Type: Choose "Text".

  • Allow Multiple Values: Make sure this is toggled on so users can select multiple records for bulk editing.

  • Size: select Large

  • On Finish: Choose the "Refresh Query" interaction. This will automatically update the main Data Table to reflect any changes made during the bulk edit.

We'll use the "" action to let users switch between these two flows and do the bulk editing.

Open Flow Dialog
Avonni Data Table