Find your content:

Search form

You are here

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"/>

Attribution to: Benj

Possible Suggestion/Solution #1

(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.

Attribution to: Bob Buzzard

Possible Suggestion/Solution #2

You can pass parameters via a list view. You can see an explanation here. Bob is right though: this is better done with a report.

I also did a lot of experimenting with apex:enhancedlist for inline visualforce pages on a layout (so users don't have to go to another window and so I could pull off a filtered related list), but I have yet to find a way to successfully pass parameters. You can do it, almost, with apex:iframe, but it will just cause the list view to load in your page, rather than the specific section of your page layout.

Attribution to: Stephanie Poorman
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content