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
Ceejay djoCeejay djo 

Export List Views Metadata

How do I export List Views Metadata? I have a need to export metadata of list views. Most especially, I need to export the List view names and the Roles/groups it has been shared to. 

​Any help would be appreciated.
@Karanraj@Karanraj
You can make use of Listview API to retrieve the information about list view for every object. The List view API will provide information like filter used, list view name, column details, and scope of the listview. Check this link for more details about list view API - https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_listviewdescribe.htm

Check this blog post to understand about more about list view API - http://clicksandcode.blogspot.ca/2014/10/export-records-from-list-view-listview.html
Ceejay djoCeejay djo
I am not sure that is what I am looking for. I need to export for list views metadata not for the list view records
Pranay JaiswalPranay Jaiswal

You can use this package.xml to retrieve List view metadata.

 

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>Account.My_Account_Team</members>
        <name>ListView</name>
    </types>
    <version>32.0</version>
</Package>

Force.com Migration tool to your rescue.

https://developer.salesforce.com/docs/atlas.en-us.daas.meta/daas/