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?

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.

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

Currently, you have selected Recently Viewed List.

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

List view

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.