function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mahnaaz Mohammadi 2Mahnaaz Mohammadi 2 

Find a list of List View for Objects

Hi everyone,
I need your assistance.
How and where do I find a list of List View for Objects(All Objects)?
I have been tasked with finding out how many List Views have been created in our Org but don't know what way I should be answering in one report.
I appreciate your assistance in showing me how to find this information.
 
Thanks,
Mah 
Best Answer chosen by Mahnaaz Mohammadi 2
Khan AnasKhan Anas (Salesforce Developers) 
Hi Mahnaaz,

I trust you are doing very well.

You can export a list of ListView by using Dataloader.io 
You have to select the Export from New Task and from object select ListView. Then in SOQL query, use below query and export the list.
 
SELECT Id, Name, DeveloperName, NamespacePrefix, SobjectType, IsSoqlCompatible, CreatedDate, CreatedBy.Name, LastModifiedDate, LastModifiedBy.Name, LastViewedDate, LastReferencedDate FROM ListView

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas

All Answers

Khan AnasKhan Anas (Salesforce Developers) 
Hi Mahnaaz,

I trust you are doing very well.

You can export a list of ListView by using Dataloader.io 
You have to select the Export from New Task and from object select ListView. Then in SOQL query, use below query and export the list.
 
SELECT Id, Name, DeveloperName, NamespacePrefix, SobjectType, IsSoqlCompatible, CreatedDate, CreatedBy.Name, LastModifiedDate, LastModifiedBy.Name, LastViewedDate, LastReferencedDate FROM ListView

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.

Thanks and Regards,
Khan Anas
This was selected as the best answer
SabrentSabrent
All the list views are stored in system object ListView.
Please refer to the documentation here 
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_listview.htm

Try this SOQL in Developer console 
(SobjectType = name of the object, DeveloperName = Name of thelist view 

list<ListView> a = [Select SobjectType,Id, DeveloperName From ListView ];
for(ListView lv:a){
system.debug('>>>>>>>>>>> ' +lv);
}

Hope this helps!
Mahnaaz Mohammadi 2Mahnaaz Mohammadi 2
Hi Khan,
Thank you. It helped.