Dynamic Lists
Live in Summer '22 and STILL not fixed in Winter '23 the long awaited (very long) “Filtered Related Lists” is here… BUT… read on before you use them.
Video
OMG This is a fabulous fix!
Thank you to SuntzuMocro on YouTube, and Alex Fram-Schwartz via LinkedIn here is an amazingly excellent solution.
SuntzuMocro suggested “Why not create a link button, linking to the full report and added as an action button on the dynamic list?” Oh, I did not think that would work at all, but it does!
Create a Report on the Parent Object, showing ALL the Child Records and add the first Parameter to be the Parent.Id. (TIP: Store these reports in a folder that NO ONE can touch except the Admins).
Create a Button on the Child Object - make it a List Button.
Paste the report URL into the button Body add fv0= to the end
Now the trick is to choose the Parent Object from the Select Field Type dropdown then select the ID in the Insert Field dropdown.
So the body ends up being https://yourinstance.lightning.force.com/lightning/r/Report/XXXXXXXXXXXXXXXXXX/view?fv0={!Parent.Id}
BUT! Alex came up with another solution by sticking a Flow below the Related List that shows a link to the actual Related List full view.
So let’s combine the both. Create a List View Button on the Child Object name it “Show all Child Records for this Parent” (eg “Show all Contacts for this Account”) and link to the full Related List URL.
https://yourinstance.lightning.force.com/lightning/r/Parent__c/{!Parent__c.Id}/related/Child__r/view
et voilà! A one click, nice solution to get to the full related list! WOW!. It’s still such a pity that we need to do this.
History
Filtered Related Lists have been needed FOREVER!
In 2015 Doug Ayers gave us a great option to use the new Process Builder to filter a related list on a lookup with a neat trick.
In Summer '19 Enhanced Related Lists came out which was an improvement, at least we had a New Button, and 10 columns! Game changer! (This was GA in Spring '20).
Also in Summer ‘19 they tried to sell us “End User Filtered Related Lists” as Filtered Related Lists AND closed the Idea! There was thankfully another idea Idea for actual Filtered Related Lists.
They showed the Filtered Related Lists at Dreamforce 2021 (at 4’30”) and said it would be GA in Summer ‘22. Why does it take a further 2 releases from demo to release it? And due to all the issues I can’t call it GA yet! Release Notes.
There have been many Appexchange apps that have tried to get around this lack of Filtered Related Lists but as many as I’ve tried I’ve found just as many problems with them… usually due to not looking enough like standard Related Lists.
The Good
The Convert functionality wasn’t there when I did my video, and that works quite well and it takes away some of the gotchas in the video - well it doesn’t remove them, it just means you won’t have to deal with them, and I STILL want an answer on that bizarreness of where the default fields come from.
We got more than just filters, we got the ability to add columns from the Lightning Page also.
Add any fields to the list view directly from the Lightning Page,
Filter that list… BUT…
Show or hide Buttons on the list view,
You don’t have to show the Name or the Name can be something other than the first column (Could be weird for users so use sparingly).
Can do Relative Date Filters eg THIS YEAR and Use ISO date formulas for Fixed Dates.
Can place the related list on the lightning page if it’s not on the Page Layout.
The Bad
Narrow Column List View layout is weird.
Especially when the Name is not the first column.
No Mobile View - the main place you need it.
Slow to set up
Can only have two on the page (But can you???! It’s what the release notes say though).
Can’t conditionally hide a field on the List View.
You can not show Name. If Name is not shown, you don’t get Selection checkboxes.
No List View Action Buttons (But you don’t have them on regular related lists either).
When editing the Page Layout there is nothing to tell you “hey, you need to go and edit the Lightning page also or instead!” - similar to Dynamic Actions and Dynamic Forms.
If you show the New Button, you can add a new related record that then will NOT show on the list.
You can’t use them on all Objects. Eg Tasks. Now Tasks already have a perfectly good filtering System on Cases, so why that isn’t a thing on all object I don’t know…
The Downright Wrong
No ability to show > 30 records - AND THIS IS A FEATURE!
No View All - even when the list view is 10 records and there are fewer than 30 records (as per the feature) in the List View.
Dynamic List in Narrow Column does not show any indication of being filtered.
Only 3 records shown in Narrow Column!
Filters don’t work as standard - eg you have to type in the Picklist Values!!!!!!!
Nothing saying what the View is filtered by - it shows the field but not the filter (That is the same as regular list views but anyone can see the filters with the click of one button, you can’t see that on Dynamic Related Lists).
The Annoying
Just Like Dynamic Forms and Dynamic Actions there is nothing to tell you this list view is not going to change when you modify the page layout as you have done for many years. Therefore gas-lightning you when you go to your page and refresh 5 times and it’s still not on the list view (or page for Dynamic Forms and Actions).
Adding a new Dynamic List to the page doesn’t bring across the fields in the list view on the page layout… however the default fields that are shown in a Custom Object’s list view are controlled by a setting that does not exist in Lightning anymore. Yes, you read that right. You need to change the Tab Columns which is no longer available in Lightning because Search Layouts now control what is in both the Search and the Recently Viewed view. So you have to switch to Classic to modify the Tab view to set the default columns!
If you have two List Views of the same object on the same page you can’t make them line up with the same column widths so it can look a bit untidy.
Tricks
If you have the regular List View and don’t show the List View Action Bar (eg hide the New Button), be sure to make the Dynamic Lists the same and hide the New Button there also).
When setting up the Dynamic List have the regular List View below it on the page so you can see which fields should be on the list.
The Future
Things I would like to see in the future:
Clone a component on the lightning page so you don’t have to set up all the fields again
Live Preview on the Lightning Page
Inline Editing
Mobile. Of course!
More than 2 on a page
Multiple Sort
Conditionally hide a field on the List View - but only based on non field-value criteria - eg Profile or Permission level
All the things that we’ve been wanting on Lists and Related Lists for ages
Rolodex
Search / Filter
Multi Level Sorting on the fly
More than 10 Fields!!!!!!!!
Different Icons on each List View
A Description Field
An ACTUAL Count of how many records there are.
To Test
Visibility of fields if one user can’t see that field.
Why the Dynamic Lists just disappears sometimes, and a few other glitches that I haven’t been able to pinpoint.
Picklist Filters - they were there, then they were gone
Why the Filter text disappears sometimes
List disappearing completely
List disappearing to just one line on the page - like an empty container
Can we use Actions or other Buttons on the List View. NOPE.
Recommendation
If you have to use Dynamic Lists then:
Don’t add it to the regular Related Tab where regular Related Lists are found
Only add it to the wide column
Ensure the Title clearly displays that it is filtered
Add the full list view below OR
Add a Report Chart below that shows a report showing ALL the related Lists.
Add a Rich Text Component Below to say that not all records will be shown - click the Report Chart Report to show all records, or view the Related List on the Related Tab
Ensure the buttons match the regular List View unless there is a reason to not show the button on this Dynamic List OR better still do NOT show the New Button on Dynamic Related Lists at all due to the “disappearing record” noted above.
Note: You can’t even show a Report link or button directly below the Dynamic List because the Dynamic Actions Bar has disappeared from Pilot (Was in Pilot in Summer 21 and never seen again https://help.salesforce.com/s/articleView?id=release-notes.rn_forcecom_lab_dynamic_actions_bar.htm&type=5&release=232 )
Live
My first Live Dynamic List
I used the convert option
I placed it on the front page above my main details record (yes it’s a custom object and no I’m not using Dynamic Forms).
I did have a regular related list there previously.
We just need to know what is happening latest on the Asset so the latest 10 is details is not too bad
It is right below the Related List Quick Links so they can get to the ALL records quickly.
Setting it to 10 makes sense because it is the same number as the default overflow on the Related List Quick Links.
I named it Latest 10 Details
It’s still disconcerting that it says “10+ items” in the byline and “(10+)” in the title but there is no way to get to the +, and yet it is exactly what the text says immediately above in the Related List Quick Links AND you can get to the more records… cognitive dissonance, much?