How to query all the list views for an object in Salesforce?

How to query all the list views for an object in Salesforce?

Salesforce List Views are stored in ListView object/entity. So, we have to use ListView object/entity to query all the list views for an object in Salesforce.

Sample SOQL:

SELECT Id, Name, DeveloperName, SobjectType 
FROM ListView 
WHERE SobjectType = 'Employee__c'

Here Employee__c is a custom object.

Leave a Reply