[SalesForce] Setting List View Parameters

I know that it's possible to modify the filters on a Salesforce report by using URL query parameters like pv0=SOMETHING.

  1. Is there any way to do this with List views?

  2. What about with list views embedded in VF? For example, could I use some kind of <apex:param> to modify the filters on the following embedded list?

    <apex:enhancedList listId="00BJ0000000UNSb" height="600" customizable="false" rowsPerPage="50"/>

Best Answer

(1) While it is technically possible to do this, the problem is that unlike reports, you can't execute a list view with updated filter criteria without saving it first. Thus your updated filter criteria is picked up by anyone who accesses the list view after you. Worse, if there are a number of links/buttons etc that rewrite the criteria, you can get into the situation where users see different results every time they access a list view. I'd advise against this to be honest, and go for a reports based solution.

(2) No, as the enhanced list can't take nested <apex:param/> components.