2

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? :-)

1
  • You can use rest API is lightning but it does require a roundtrip to the server to let Apex do it.....Also, and not sure if this JS is supported in Lightning, but this is how I access the metadata Api in VF without the need for the complexities of the apex wrapper - salesforce.stackexchange.com/questions/165976/…
    – Eric
    Commented Apr 24, 2017 at 14:54

1 Answer 1

0

The short answer to this is current version of Metadata namespace supports only custom metadata types and layouts .

It does not support objects and hence no support for list view. You will still need to use metadata API to do this or using a JavaScript library like JSforce that provides access to APIs like REST.

2
  • 1
    Lightning (or UI) API also does not seem to provide ListView describe information and also currently it is still Developer Preview mode.
    – VarunC
    Commented Apr 24, 2017 at 11:27
  • Yes sounds like you will need a REST or SOAP Commented Apr 24, 2017 at 11:28

You must log in to answer this question.

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