I've been reviewing the very promising APEX Metadata Namespace
in Summer '17
(API v40.0) - Release Notes (Preview)
But I'm unable to find any reference for retrieving ListViews
of any Object. I'm interested in reading Columns & Filter settings for List Views. The information is available in Metadata Webservice API, but not in APEX Metadata Namespace (at least I'm unable to find any reference).
If anyone with good knowledge of Metadata api, can point me in the direction of how to get the List View Describe:
- Without using Metadata Webservice API
- Without the need for adding External Endpoint in Remote Setting for same org
- Without REST API
Well I'm kinda only left with 1 option of accessing via APEX, natively, because:
- I do not want to add Remote Site setting in a managed package
- I want to support both Classic and Lightning Environment (along with Lightning Components) and REST API is inaccessible in Lightning Components, like we can do in VF pages, and using REST API in APEX class to describe ListViews would require me to configure a Remote Endpoint in Remote Settings, which I do not want in my design.
If any Salesforce employee happens across this post, then a humble request: why not include ListViews in APEX Metadata Namespace
as well? :-)