Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Salesforce now allows users to define List Views for Classes, Pages, etc. But I can't figure out how to deploy these to other orgs! Typically, list views are deployed as part of the CustomObject metadata type, but classes and pages aren't Objects. Is there a way to do this?

share|improve this question

2 Answers 2

List Views can be deployed separately. Please check out the metadata documentation.

Sample XML looks like:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
. . .
    <listViews>
        <fullName>All_Mileages</fullName>
        <filterScope>all</filterScope>
        <label>All Mileages</label>
    </listViews>
    <listViews>
        <fullName>My_Mileages</fullName>
        <booleanFilter>1 AND 2</booleanFilter>
        <columns>NAME</columns>
        <columns>CREATED_DATE</columns>
        <filterScope>mine</filterScope>
        <filters>
            <field>NAME</field>
            <operation>equals</operation>
            <value>Eric Bristow</value>
        </filters>
        <filters>
            <field>City__c</field>
            <operation>equals</operation>
            <value>Paris</value>
        </filters>
        <label>My Mileages</label>
    </listViews>
. . .
</CustomObject>
share|improve this answer
    
And this also applies to Pages and Classes, which aren't CustomObjects? –  Benj Feb 7 '13 at 20:19
    
I have not tested it myself, but I would assume so as long as you provide the proper fullName which should go to a specific API name. –  Jesse Altman Feb 7 '13 at 20:20
    
@Benj my understanding is this only works for custom objects and I believe custom settings, most of the setup area config remains largely absent from the metadata api –  Ralph Feb 15 '13 at 1:58

I don't believe you can do this.

Apex Classes and Pages are two files in the metadata, the .cls or .page file for source code and a *-meta.xml file containing the API version number and status.

There is no container into which such a list view definition could be put (unlike a CustomObject).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.