Video tutorials
/
How to Bulk Edit Salesforce Records in Flows Using Avonni Data Table
Screen Flows

How to Bulk Edit Salesforce Records in Flows Using Avonni Data Table

Select rows in a Data Table, then edit them together in a second flow opened by a Bulk Edit button.

Advanced
12:01
Tutorial
How to Bulk Edit Salesforce Records in Flows Using Avonni Data Table
Play video
Chapters
0:00 INTRODUCTION & RESULT 1:26 CONFIGURING THE FIRST SCREEN FLOW WITH THE DATA TABLE 2:36 CREATING THE BULK EDIT BUTTON ACTION 3:25 CONFIGURING THE SECOND SCREEN FLOW TO BULK EDIT SELECTED RECORDS 3:35 CREATING THE VARIABLE COLLECTION 4:00 CONFIGURING THE AVONNI APEX ACTION - TEXT TO JOIN 5:53 CREATING THE QUERY FILTER FORMULA 9:00 ADDING THE DATA TABLE COMPONENT 10:57 TESTING AND FINAL REMARKS
Click a chapter to jump to it
Watch on YouTube

What you will build

Add bulk editing to an Avonni Data Table: users select rows, click Bulk Edit, and change them together in a second flow. For Salesforce admins comfortable with formulas.

  • A first screen flow with the Avonni Data Table
  • A Bulk Edit button action that passes the selected records
  • A second flow that joins the record Ids with the Avonni Text to Join action
  • A query filter formula (Id IN) that loads the selected records
  • A Data Table to edit them, then a test

Transcript

0:00 INTRODUCTION & RESULT

Hello everyone. Today this video is about making your Avonni Data Table even better with a bulk edit feature we will integrate. So let's take this example of an opportunities Data Table, and let's say you have a list of opportunities. So users, on my example, are able to select multiple opportunities and click on this bulk edit custom action I put on the header. And by pressing this button, it's opening another screen flow with the selected records, displaying that information inside the Data Table with the input data source. So users are able to, on the fly, mass edit information right from there regarding specific opportunities. So there will be two parts in this tutorial. The first one is really to build a first screen flow to display a list of records using the Avonni Data Table, like the example I have right there. I'm displaying a list of opportunities with specific fields. I also added a header action at the top that says bulk edit. And the second part, it's really to create another screen flow that will open as a modal box to display the relative opportunities to edit, based on the user selection. So I will show you how to get started. So I will show you how to create this tutorial from

1:26 CONFIGURING THE FIRST SCREEN FLOW WITH THE DATA TABLE

scratch. So as I said, first step, we need to create one screen flow to display the related information on the Data Table. So this is my screen element. I will drag the Avonni Data Table right there. Let's enter the API name, open the Component Builder, and from there I can fully customize the Data Table. So here, what I will do, I will go to data source, query, query the Opportunity object right there. And now I will go there, Fields, and from there I'm able to drag the fields I'd like to display. So name, let's say amount, close date, and then, what else can we add, the probability field. And okay, right there, we can maybe change the order right there. Okay, perfect. So this is a basic Data Table displaying a list of opportunities. I can enhance the data present on the columns. So let's say name, I'd like to linkify this. Amount, okay,

2:36 CREATING THE BULK EDIT BUTTON ACTION

probability, okay, that's pretty much fine. Now let's expand the Header section and let's add the bulk edit button. So here, bulk edit, on the action. Save. So now I just added this bulk edit button on the Data Table, which is fine, but this button is not yet functional. We will make it functional once we finish creating the other screen flow, the one that will open as a modal box to display the list of opportunities using the bulk edit. Okay, let's save that. Okay, save the flow. So now let's configure the other screen flow, the one that will display as a modal box to let users bulk edit information based on the selection they made on this Data Table. Okay, so we create a new flow

3:25 CONFIGURING THE SECOND SCREEN FLOW TO BULK EDIT SELECTED RECORDS

from scratch, Screen Flow. Okay, the first step here, I need to

3:35 CREATING THE VARIABLE COLLECTION

create a variable, and this variable will hold the list of record IDs we want to edit. So selected IDs. Data type, it's Text. Allow Multiple Values (collection), that's really important, and Available for Input, that's important as well. Perfect. Next, we need to add an

4:00 CONFIGURING THE AVONNI APEX ACTION - TEXT TO JOIN

action. We need to add an Avonni Apex action right there. You're selecting the Avonni category, and we select the Join Text Collection, and this action is important because it will help us format the list of record IDs correctly, so we will be able to use that list on our query filter for the Data Table we will display just below that. Because, you know, the selected IDs collection variable will give us the selected IDs separated with a specific format, and we need to change that format. So to use a delimiter on the action, to make sure that we will use that collection variable correctly on the Data Table. So let's say, create the text collection. Okay, Source Collection, okay, and Source Collection, it will be the selected IDs, so the variable we created just before. Delimiter: the delimiter, it's really to add like a comma. So we are adding this syntax, the comma, and we are finishing with this syntax. That's the delimiter. So basically it will return the selected record IDs using this delimiter. Now, on Show Advanced Options, we need to check Manually Assign Variables. Why? Because we need to create manually a variable, and this variable will hold the properly formatted list of IDs we will be able to pass on the query on the Data Table. So output, New Resource, let's select Variable, and here let's say selected record IDs. Data type, it's Text. I don't have to do anything else. Perfect. Okay, now we need to create

5:53 CREATING THE QUERY FILTER FORMULA

a query filter for the Data Table, where we will display the bulk edit information by filtering dynamically the query regarding the information we want to display. And this formula variable will act like a filter. It will tell Salesforce: okay, only show me the records whose IDs are in this list. So here, resource, Formula. Let's name it query filter. Type, it's Text, and let's type the formula. I will put the formula syntax in the video description just below. So okay, here it's ID. So basically this formula is like the WHERE in my SQL query. So WHERE ID IN, and then we will have this syntax, so bracket. Okay, I will copy paste this, because I know it can be confusing. Okay, and here we need to put this resource, the one with the selected record IDs variable we created on the action. Let's do a syntax. That's perfect. Next, let's add the screen element to display only the information we want to bulk edit. Data Table. Okay, open the Component Builder. Let's configure it. Query, display the opportunity. Okay, but here I don't want to display the list of all the opportunities. I need to filter the opportunity list. So here I will map that to the formula resource we just created right there. So this filter will tell Salesforce: okay, only show me the list of opportunities filtered by the IDs of the selected record IDs I have on this formula. And now let's go on Fields and let's add the fields on the Data Table. So amount, name, amount, close date, and then probability. Okay, probability right there. So now I can adjust all column settings. Let's make those columns editable and display as input. Perfect. Now let's save and create the interaction to make sure the information is saved correctly. So let's create the save interaction to make sure the information is saved correctly: Update Records on Save. And let's add another one, flow navigation, and this one is Finish. Why? Because we want this modal box to be closed once saved. So by doing this flow navigation interaction on finish, it will close the modal box and then go back to the first flow. Okay, save, and let's activate the flow.

9:00 ADDING THE DATA TABLE COMPONENT

Okay, now let's get back to the first flow we created, because we need to connect this flow with the first one. So this flow will be displayed, this one, bulk edit, as a modal box. So here, on the first one, we open the Data Table, and then we go on Interactions, and we create an interaction on the header action, because we want this interaction to be triggered when users are pressing the bulk edit. So here it's bulk edit for the target. Open Flow Dialog. API name, it's bulk edit. That's the name of the flow I want to open as a modal box. Input variable: that's extremely important. We need to type the name of the input variable we created on the other flow. So let's get back to the bulk edit flow, and here I'm talking about this collection variable. So just copy paste this name, and get back here and paste the name right there. And the value for this input variable will be the selected record IDs. So here we are passing the selected record IDs from the Data Table directly to the flow. Very important to check this, Allow Multiple Values (collection), otherwise users won't be able to mass edit, bulk edit multiple information at the same time. Size of the modal box: large. Modal header, we can say open opportunities. On finish, we want to refresh the query. So we want to refresh the query of this Data Table to make sure the information is instantly reloaded and integrated on the Data Table. Save. Let's do now Save As New Version, and let's do a run. So that's really the moment of truth to test it, or we can do a debug as well, to test the

10:57 TESTING AND FINAL REMARKS

flow. Okay, the flow is loading perfectly fine. Let's select multiple items, let's say four items. Bulk edit. Yes, they are displaying correctly. We can change the probability or the close date, let's say, let's make it October. Save the information, and it's automatically saved the information correctly. As you saw maybe on this Data Table, the bulk edit one, we can adjust the settings. Maybe we can hide the checkbox. So if we get back to this flow, bulk edit, open the Data Table, we can, here, open the Component Builder. We can add checkbox column. Okay, that would be great. So that's pretty much done for what I'd like to show you today regarding this video, and I think it's really an interesting video to build, like, this bulk edit in the Data Table using screen flows. Let me know if you have any comments just below. Thank you so much for watching. Bye-bye.

Show the full transcript

Questions this video answers

How do I pass selected rows from an Avonni Data Table to another screen flow?

Add a header action interaction with Open Flow Dialog, type the exact name of the input collection variable from the other flow, set its value to the selected record IDs and check Allow Multiple Values (collection).

How do I filter an Avonni Data Table query to a list of record IDs in a flow?

Join the IDs with the Avonni Join Text Collection action using a comma delimiter, then build a Text formula in the form Id IN (...) with that output and map it as the query filter.

How do I close the bulk edit dialog and reload the first Data Table after saving?

In the second flow, add a flow navigation interaction set to Finish after the Update Records on Save interaction, and in the first flow refresh the query on finish.

See it as a use case
No items found.
Build it in your org

Free in sandboxes, 10 free production licenses.

Start free
Keep going

Related tutorials

Find your next tutorial

Browse the whole library, filtered by where it runs and what you want to build.

All video tutorials