function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Purpose of Body Facet in a Listviews?

The <apex:listViews> tag is nice for adding the standard SFDC view functionality to a custom tab.  But it curiously allows for a "body" Facet, which "replaces the list of records that would normally display." 

I'm curious what the use case is for using a body facet with this tag?  You end up with a pretty confusing and apparently useless View picklist.  Perhaps an example might better illustrate - does anyone have a useful example?  (I'm guessing that perhaps the body facet could somehow dynamically present different content based on what view was selected.)

The reason I ask in the first place, is that we're seeking a way to filter which Views appear in the views picklist.  I don't see any way to do this, but ran across the body facet and it got me wondering.

The purpose is to be able to leverage the metadata and presentation of the listviews while providing your own implementation for the list. We're working on functionality now that will make responding to the selection of the picklist more meaningful in that regard.  Perhaps a bit of cart before the horse there. 

What is your use case for filtering the listviews in the picker? There is also no way to do this today but something that is near to what we are working on now so if I understand your goal we might be able to work this into what we're doing now.

Hi Andrew,

The customer wants more than one "Account" tab.  For example, they think they want a "Partners" tab and a "Customers" tab - both linked to the Account object, but each showing a unique set of Views that filter Accounts by a "Type" field.  We may also add some custom stuff like search links that restrict the search to a subset of Accounts, etc.