Is there a way to get API Names of fields through Apex, which are displayed in the list view? I tried using Metadata API, Rest API, User Interface API, LDS.

1 Answer 1


List views are part of the CustomObject metadata type since they're associated with specific object configurations. The list view columns will have the API names of the fields displayed. Here's an example of a list view on a Lead.object metadata file:

    <label>All Leads</label>

Unfortunately, the built-in Apex Metadata class can only reference custom metadata types and does not have an interface for standard metadata.

Additionally, you can access list view information through the User Interface API List View endpoints to get results given the API name of a list view and the associated object:


You must log in to answer this question.

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