2

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

2 Answers 2

2

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

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .