A related list built as a screen flow: search, filters, a button that opens a flow panel, and images.

Build an advanced related list as a screen flow with the Avonni Data Table, then add it to a record page. For Salesforce admins who want more than the standard related list.
Hey everyone, and welcome to the Avonni YouTube channel. Today we will dive into the world of Salesforce and learn how to build awesome custom related lists using the Avonni Components package and Flow Builder. Now you might be thinking, related lists, those boring standard tables on every record page, and you would be right. Sometimes the regular related lists just don't cut it. They can be rigid and lack flexibility to display information exactly how you want it. But fear not: with the Avonni Components package and Flow Builder, we can supercharge those related lists, making them more dynamic, informative and user friendly. Let's dive in. To build the awesome related list I'm going to show you, you will need the Avonni Components package on your Salesforce. You simply need to go to the AppExchange, type Avonni in the search bar and install the package right from
there. But first, let me show you a sneak peek of what we will build today. So this employee directory related list is built entirely with one single screen flow component. It's using the Avonni Data Table, and look at all the features we have. We have inline editing capabilities, where you can inline edit any field information you have. You have a search engine. You can display avatar pictures. You can also display specific information using badges. You can even add button actions that will display related information coming from another screen flow, to directly change or have access to more information within the related list, and without navigating away. I can show you a lot more stuff, like how to create a new employee directly from this button action, how you can even export the directory as an Excel or CSV file, all within the Data Table and only by using one component. It's a screen flow. It looks exactly like another related list, but with all the features on steroids. Let me show you how to build this inside Flow Builder now.
Okay, let's open up Flow Builder and create a new screen flow from scratch, and select Screen Flow. Now let's create, this is really the first step we need to do, we need to create a text variable to store the current record ID. So here, create a new resource and we select Variable. So let's name it recordId. Data type, it's Text, and make sure to check this to make this available for input. So this variable will capture the ID of the record page we will be placing the flow on. Okay, all we need to do is add a Screen element, add a label. I want to add the Header and the Footer, and now all we need to do, we need to place the Avonni Data Table from the list of the components we have access to, directly from there. Okay, let's name it data table related
list. Open the Component Builder, and from there, this is where I'm able to fully configure my Data Table. From the properties panel, I need to scroll down to the data source section to be able to connect my Salesforce data with the component. Here I'm looking to create a related list that would display contacts based on a specific account. So here I will do a query. I will create a query right inside the Data Table, and I will select the Contact object. But I need to filter the information from the contact, because I don't want to display all the contacts from my Salesforce. I need to filter the information by the account ID, and for that I will add a condition based on the Account ID field is equal to the value of, and we need to map that to the text variable we created, the recordId. Save. Perfect. Now what we need on the Data Table itself, we need to click on Fields to drag the fields we'd like to display on the Data Table. So for example, I'd like to drag the full name, and then we can add location. Perfect. Now we can fine-tune the columns. For example, for the name, if we want to make the name linkify, we can check Linkify. So this will create a link directly to the corresponding contact record page. You can also make this specific field, if you want, searchable, editable, display as input. You have all the options to customize the look and feel of each column. Department, you can say, oh, I'd like to make the department editable and filterable. Now you can see the filters here at the top. The same for the location. Oh, let's say I'd like to make the location filterable and searchable. So this will be searchable in the search bar, and you can also see the filters. Okay, we just configured the data mapping with all the columns. Now if you
like to add one new column to display, let's say, a button on the Data Table that will open related information as a panel, you need to click Add Column. You don't need to select any source field, because it's not related to a source field, but you can say, oh, I'd like to display a button or a button icon, and you can even type for an icon, let's say panel. I want to open a panel right there. You can save that. Name, let's say panel. It's really important to put the name here, because we will use the name for the interaction. Okay, you can even fine-tune the look and feel of this column. You can adjust, for example in Advanced Options, you can say fixed width of 40 pixels. Okay, perfect. And you can fine-tune the look and feel, the variant of the button icon. Okay, we just added the button icon right there, but this button icon is not functional yet. To make it
functional, you need to go on Interactions to trigger the interaction when users press this button. And here it's an interaction on the row action. Why? It's really based on a row. So here you will select Add Row Action. You're selecting the target name, the button we just created, and then you can trigger the interaction you want to trigger. So basically I want to display related information based on this selected contact and open this information as a panel. So we have an Open Flow Panel interaction, and then all you need to do is to select the flow you want to open as a panel. So please make sure to create this flow first, otherwise you won't be able to select the flow. So here, demo contact panel. And here you need to specify the input variable. That's really important. For that, you need to use a name for the input variable. If you open, this is the flow I want to open as a panel, and on this flow I created the recordId variable. So please make sure to use the exact same name as the flow you want to open. So here, for the input variable, the name would be input. So the value I'm going to pass, it's the contact ID, so record contact ID. It's Text, yes. For the Allow Multiple Values collection, leave it unchecked. We only want to pass one single value. And then you can also fine-tune the information on the panel. For example, header: you may want to display the full name as header. Regarding the record position, what's the position of the panel? Do you want to display the panel on the left or on the right side? And then the size: oh, I want to display the panel as x-large. And then Hide Close Icon, if you want to hide the close icon, or outer, if you want to display the panel outside the component. Okay. One last step regarding the panel: you can also add an interaction on finish. So basically it means that when this flow is open, the demo contact panel is open as a flow panel, when this flow is finished, you may want to refresh all queries. So this means, let's say you inline edit information from the panel, you want to refresh the information on the main Data Table when this flow is finished. Save. So here we just configured the column, we just made the button icon fully functional. Now let's fine-tune the
header section. If you go back on Properties, you can expand Header, and from there you can say, okay, employee directory, and you can select an avatar, let's say group, and you see the preview right there, which is really nice. It's joined to have this little border added on the header. And now you want maybe to have actions, let's say export directory, to have like an export button. Again, like the button icon we just did previously, the button action is not functional. You need to go on Interactions, and this time we need to create a header action interaction. Export directory: what is the action you'd like to trigger? We have a dedicated interaction for that, Export To. You can define the default file name, hide export dialog if you want. You can also display the selected file format available for the export, and done. Still regarding the interaction, if you want to enable inline editing on the Data Table, please make sure to add a save interaction. Add Save, and then you can select Update Records. Save. So this interaction is really important if you want to make sure that the inline editing information is saved on the Data Table. And now, if you want to make again a specific field editable, you can go back on the properties, and as I showed you just before, you can just select the column, make this editable, and you're done. Now you will see the pencil right there. Okay, that looks good. Maybe one last step, fine-tuning the style of the Data Table.
So here on the style panel, you can really customize the style. For example, if you want to add a border right there around the Data Table, you can select a color, or maybe this one, size one pixel, style solid, and apply a radius of five pixels. So you see now you get the border around the Data Table, which looks exactly like a standard related list from Salesforce itself. So now, okay, for the style, header title font size maybe 16, to have the exact same font size as a standard related list. Okay, search, you have the export directory, department, location. What do we need to finish this? Maybe if you want to display, okay,
let's do one last thing. On the employee directory, we want to display a picture of each contact. For that, what I did on my side, I created a custom field, which is a URL field, where I'm storing the URL of each contact picture. So you can drag the field right from there, and from there you will see picture URL. It's displaying the URL of the picture. Now we can go on the data mapping column, and we can fine-tune how to display the information coming from the picture URL field. Type: we can say, oh, I'd like to display this using an avatar, and then you can say, oh, circle or square, and set the size of the avatar, and you see instantly the picture of the contact. You can fine-tune this obviously. Picture: maybe if you want to make it bigger, you can also specify a fixed width for the column. Save. And again, picture URL, let's click it again. You want to add a custom label, and you don't want to display a label right there. You can now, you can see the picture, no label, and you see the picture of each contact. So please make sure to use the custom URL field and make sure to have a value inside. We just created a custom, highly customizable related list. Let's save the flow and do a
test. Okay, now to test what we built, let's say I am on this account record page. Related: I want to display here, on this Related tab, our custom screen flow that will mimic the related list. So here all I need to do is open the Lightning App Builder, Edit Page, click on the Related tab, drag the flow and select the flow you want to display. So mine, it's demo video related list. Okay, extremely important: make sure to check this, to really make sure we are passing the current record ID as a variable. Save. Let's see the result on the page. Related, and now we can see our related list. We can even click here to display related information as a panel. You can see the size. You can fine-tune the size of the panel, maybe not using the extra large for my use case, maybe reducing the size, but you see everything is working as expected. I can even download the information as an Excel or CSV file to download the employee directory. So that's pretty much how you can really create in minutes a nicely customized, advanced related list inside Salesforce using Flow Builder, screen flows and the Avonni Components package. I hope you enjoyed this video. Let me know if you have any questions. Feel free to post your question in the comment section below. Thank you so much and have a great day.
Create a recordId text variable (Available for input), query Contact in the Avonni Data Table where Account ID equals recordId, then add the flow to the Related tab of the record page with the record ID passed into the variable.
Add a column with no source field of type button icon and give it a name, then add a Row Action interaction on that name of type Open Flow Panel, passing the record ID as an input variable.
Add a header action (Export directory in the video), then in Interactions give it the Export To interaction, where you set the default file name and the file formats.
Browse the whole library, filtered by where it runs and what you want to build.
All video tutorials