0

How can I get the list of all Lead list views?

screenshot

Also, how can I get the people from a particular list by means of Apex?

2 Answers 2

1

When you initialize an ApexPages.StandardSetController with a query on a particular type, you can use the set controller's getListViewOptions() method to obtain a list (in the form of a List<SelectOption>) of the list views for that object. The value of each SelectOption is the Id of a list view that can be passed to setFilterId() to filter the Set Controller according to that list view's criteria.

Jitendra Zaa has a pretty clear example of how to use this technique.

1
  • Thanks David, i will test it now and let you know, but seems exactly what i need so far.
    – Thimotty
    Apr 2, 2018 at 16:01
0

Currently, you have selected Recently Viewed List.

You need to change the drop down to list all list.

List view

1
  • Thanks Santanu, my fault i didn't describe my question better. I ment in apex.
    – Thimotty
    Apr 2, 2018 at 16:03

You must log in to answer this question.

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