A related list on a Lightning record page with row buttons, search, filters, inline editing and a view toggle.

Replace a standard related list with an Avonni Dynamic Component on a Lightning record page. For Salesforce admins and consultants who want a related list users can act on.
Hey, hello Avonni subscribers. Today I'm going to show you how to build an enhance related list using the Avonni dynamic components. So when I'm talking about related list, I'm talking about related list you can find on Salesforce on a specific record page. For example, on this page account page, I have the standard default Salesforce related list. But if you like to make them more visual appealing and also making them more interactive, more powerful. I'd like to show you how to easily build your own related list using no code and using the Avonni dynamic component. For this example, I'm going to create my custom Nance related list for the account object. Let me show you how. First, make sure to install the Avonni dynamic component package. You can find a link in the video description below. When it's installed, you can launch the Avonni components app from the app launcher. This is the homepage to create your avoony dynamic component and those component can then be placed on any Lightning pages anywhere on your sales source. Very powerful. Let me show you how to create our NN related list. Let's create new. Let's name it create. So this is the builder where I can easily build any type of custom solution with no code. How I can do that? By using all the Avonni components available from there on the left side. So you will find more than hundreds of components available. 100 components available actually. The first thing I need to do because as I said this is a related list I'd like to place on an account page. So this dynamic component needs to know the context where it will operate and for that I need to go on this settings icon to select a page a target page object and that's really important because by selecting account object the dynamic component will know the context where it needs to operate. Okay, great. Let's start by dragging a card element for the related list. And let's say you want to display a list of contact. Let's pick up an icon right there. So the card it will like our main container for our related list. And now we can customize the style of the card. So we can say oh let's select the background color border size one pixel and let's play with the border radius 15 pixel. And again you can tweak the style if you like to make it more SLDS2 uh you know look and feel. You can play with some styling settings to make it exactly like SLDS2. So, okay. Size. And then for the header, okay, 16 or maybe 18 pixel. Okay. So, next let's put some content inside the card. For that, let's drag a data table inside the card. And now, once you drag the data table, you can create your query to connect your Salesforce data with the data table. So, create a query. Create query here. Let's say I like to display contact. So from the contact object you can type for an object. Here I need to filter the contacts. I don't want to display all the contacts coming from my Salesforce. I only need to display the contact that are linked to the current account page. So for that I will say filter by the account ID is equal the values. So it's the dynamic value of the current account ID. So here it will be mapped and then from the map you will select the global variable dollar sign component and record id and because at first we set up a target page name this is why it's important to set up that at first save. So the query is created on the data table. Now all I need to do it's really to add column. So what you'd like to display on the data table? Let's say I'd like to display the full name of the contact and let's say linkified information. If you like to make it editable, you can featureable searchable. This is where it's very interesting because you can really make a fully working and deletable as a related list. Let's say now doing the same thing for other fields like email, email type. If you like to make it editable, that's that's correct. That's possible. Let's say phone business phone that would be the phone type. Make it editable as well. Okay. Now, if you're making some fields editable within the data table, it's really really important to create an interaction to make sure the information would be saved on Salesforce when users are editing the information. So for that you go on the interaction tab right there and then on save you will create an interaction. So it will fire an interaction when users are saving the information using the inline edit. So save and you will select the interaction update records. This one really the update records. That's it. Save. So now the information would be saved automatically on Salesforce. Let's get back again on the properties. Now let's say I want to add a button on each row and this button I want to trigger an interaction to open a flow. So to edit more information about the contact. So here I will say add a column and the type of the column will be like button or button icon. Let's name it button and we can say edit for example. You can add an icon if you want. Save. So now I have my edit button. You can also fine-tune, you know, the the size of the column. You can go back on the columns properties and scroll down advance option fix width. Let's say 150 pixel. You can even make it smaller 80. Okay, perfect. Now is created. You need again same thing. You need to fire an interaction. What will happen when you press the edit button? So into action, it's a row action click. Add row action click. Edit. And now as I said just before I want to fire an interaction that will open a screen flow. I already created this screen flow. So I will select the type of interaction that will be open flow dialogue. I want to open this flow as a model box. And here for the API name just select the flow you like to open. So demo uh panel it's this one. Now you need to pass the input variable. So you need to pass the record ID of the contact. So uh directly to the flow to display the related information. Uh here let's variable input. So again that's really important input that's the name of the text variable available for input I created on the flow. So you need to make sure you already have created on the flow you like to open um a text variable available as input and that's why you will be able to select from there. So if if you don't have any text variable or record variable created, you won't be able to make this work and you need to uh make this first. So input what the value what's the value I'd like to pass to the flow. I'd like to pass the contact ID value. That's it. Close. And then we can say when this flow is finished, we want to refresh the queries all queries or query of this data table to make sure it will you know update the information with what you just done on the flow. Save. And that's it. I mean I'm I'm done with that with the interaction. At any time you can also preview what you're do. So here you can say edit. You can even preview the flow you're trying to open. This is really excellent. Perfect. Let's get back to the edit. Now, as you can see, this can be improved. Why? Because on the card, the data table is not really flush to the card. So, we can select the card again and check this expand to content fit. Now, you will have a more polish look and feel regarding your the related list. Again, doing a preview. That's the preview of the related list. You have a search engine. You have filters. You can really customize the data table the way you want. If you have to, you know, add more fields as filters. If you like to, you know, add more interaction, that's also possible. Okay. Now, let's do more advanced stuff. That's where it's becoming more interesting regarding the dynamic component. Let's say I like to be able for my users to select a different view type of my related list. For example, I like them to be able to see the contact as a table, but I want also to present the contact information as a list. That will be awesome. So first what I'd like to do I like to place like a button icon or a button menu that will give me option to change the view type. So so here I'm thinking about dragging first a column directly inside the action box into the card and here I will create a two column layout. So I will just create two columns add some space between column. So now I have like two those two columns at the top of the card and what I can do I can say okay text display text right there and the text let's say okay view as great and now I like to put checkbox group right there and this is where I will select my buttons so here okay view as let's name it table and the value will be table option B let's replace option be like view as list value would be list okay let's remove option C we don't need option C label I mean you can leave that label name but here for the variant label item now for the value oh that's important because here I want to define a default value when users are opening this related list so value would be table that would be the the selected value by default okay let's now fine-tune the look and feel of this checkbox group. So here the type will be button. Okay. Horizontal. Yes. And display as well. Perfect. Is multis select? No. Uncheck that because I don't want users to be able to select multiple views at the same time. And then I can select the column again, play with the uh vertical alignment to make this more appealing. Okay. Okay. So let's do a preview again. We have our two buttons list and table. Now those button needs to be functional. So basically first on the data table I will set a component visibility rule that will say okay show me the data table only when the value coming from the input choice set which is the checkbox group. So input choice set value is equal to table. Okay. So now if I'm clicking on table it would be displayed. Um okay now next I need to have a list view. So for that let's drag the Avonni list on the card inside the card same thing and here what I will do you need to select the data source query I already created the query on the data table. So I can reuse the exact same query. So here get contact that's my initial queries and then I can refine tune the mapping or the look and feel of the list. For example, if you like to make items clickable, if you like to have a divider button, if you want to add maybe fields into additional fields like the uh birth date, the title, the phone number. Okay. And I mean you can do a lot of things with that. You can customize the style as well. So if you like to play with the style and playing with the item label right there, font size uh 16, play with the color, there is a lot of things you can do obviously and then you can even fine-tune this by adding an avatar. So I think I already have like a a field that would display the image. So it's the picture field. So now I can see or mark images which is awesome. and okay so I can see some images let's say it's done for the list now like I did for the data table I need to set a component visibility rule so I want to only display the list when the input choice set value is equal to list which is I mean this one the value it's coming from this value so make sure to keep the exact same syntax so now let's do a test preview okay table list table list. I mean, you know what I'm talking about. Uh, great. So, this is obviously what I did. I just, you know, created with clicks an enance related list very briefly. It's really to show you all the capabilities of the Avonni dynamic components and how you can really easily create any custom UI functional UI because you can do interaction with openflow dialogue with a lot of things. So, this is really powerful. So now okay I just created this N3 list what's next I need to activate this and to make this available for my users. So I need first to activate the component and then and now I can go on the record page and from there edit page to open App Builder related you're typing a and now you select the component you'd like to display on the page which is this one save let's get back live on the page now I have a fully working NN related list built within minutes using the Avonni dynamic component and you have you as table, view as list, everything is functional with the actual correct data from the record page. So this is what I'd like to show you today. How to build an enhance related list using Avonni dynamic components within minutes. You can build a fully customizable list into your Salesforce. Let me know if you have any question. Feel free to drop your question in the comment section below. And also and also making sure to install the Avonni dynamic component package by using the link in the video description below.
Set the target page object to Account in the component settings, then filter the Data Table query on Account ID equals the mapped global variable $Component.recordId.
Add a Button icon column, then a row action click interaction of type Open Flow Dialog. Pass the contact ID to a Text variable available for input in that flow, and refresh the query when the flow is finished.
Add a checkbox group with Table and List values, then put a component visibility rule on the Data Table and on the Avonni List so each one shows only when the input choice set value matches.
Browse the whole library, filtered by where it runs and what you want to build.
All video tutorials