I am looking to provide a mechanism that uses the filter part of list views to filter a graphical representation of various (custom or standard) objects. I want the user to be able to select any existing list view they have, using a drop list, for a given object that is being graphically represented in our custom LWC. These list views would be those that are shared (by themselves or others) and those that are private to them.
That means I need a way to get a list of the user's list views for a given object.
I've been researching how I might do this and have found:
- The metadata API allows access to a list of list views, but this excludes "Visible only to me" list views.
- The lightning/uiListsApi wire services module allows access to the detail of a named list view, so I can build the required filter query, but has no mechanism for discovering the list views the user has access to.
This leaves a gaping hole where I cannot discover the user's available list views since many of these would be "Visible only to me" restricted.
Is there a mechanism I can use (ideally from Apex, but at a push from LWC) to get the list of list view API names for a given user including their "private" ones?
If not, is this suggesting that Salesforce do not recommend trying to use list views to achieve the sort of use case solution I've outlined, above?