3

The requirements are:

  1. get all of listviews for objects.

  2. can filter each objects.

For example, I want to get a map<String objectName, MetadataObject[]>

map.put('permit2__c', Permit2__c_listView[]);

Permit2__c_listView[] contains a list of listviews for this object.

Can anyone have some idea or some solution?

Now, I can get a list objects by using metadata API but cannot find the list view in each object. I appreciate that you can provide some solution or code for me.

2
  • I don't think it is possible to retrieve list views via Apex, however have you seen this page in the Metadata API documentation? salesforce.com/us/developer/docs/api_meta/Content/… Commented Jun 3, 2014 at 2:22
  • You will need the ListView Id's (KeyPrefix 00B) to put on the query string with the fcf parameter. At first glance you don't see that ID in the Metadata response. Nor can you see ListView via the Partner or Tooling APIs. Commented Jun 3, 2014 at 2:26

2 Answers 2

2

You can refer to this link boss!!!!!!!!!!

http://www.jitendrazaa.com/blog/salesforce/listview-filter-in-apex-with-paging-and-navigation/

1
  • Hi Tanmay, can you include relevant information from the post? Also there's no need to ask for the answer to be accepted, that's inherant in the site's design.
    – Matt Lacey
    Commented Jun 10, 2015 at 22:35
2

The StandardSetController provides a getListViewOptions that will return list views, and can display lists filtered to the list view.

You must log in to answer this question.

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