Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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="">
. . .
        <label>All Mileages</label>
        <booleanFilter>1 AND 2</booleanFilter>
            <value>Eric Bristow</value>
        <label>My Mileages</label>
. . .
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 Callaway 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


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.