[SalesForce] Parsing ListViews columns from the Metadata API

I am trying to parse ListViews from the Metadata API to try to show the content I have locally.

The documentation I found explains some of the fields, but not in details.

For example take a simple ListView for the Contact object.

<listViews>
    <fullName>NewLastWeek</fullName>
    <columns>FULL_NAME</columns>
    <columns>ACCOUNT.NAME</columns>
    <columns>CONTACT.TITLE</columns>
    <columns>CONTACT.PHONE1</columns>
    <filterScope>Everything</filterScope>
    <filters>
        <field>CONTACT.CREATED_DATE</field>
        <operation>equals</operation>
        <value>LAST_WEEK</value>
    </filters>
    <label>New Last Week</label>
</listViews>

The columns that are given do not correspond to the fields in my Contact object. FULL_NAME and CONTACT.PHONE1 do not exist.

CONTACT.CREATED_DATE obviously corresponds to the CreatedDate field, but it does not use the same syntax.

Finally LAST_WEEK is not a real value, but a placeholder for a more complex query. For this one, I found a help page listing all the possible values.

Is there a documentation that could help me map the "missing" column names with the real ones?

Best Answer

From what Ive been able to gather the names that appear in the Metadata API for ListView columns are the backend Oracle DB names and there is no public API for translating them to the salesforce native names. Custom columns should come through with the appropriate names and if necessary the Oracle names can be manually mapped to the native names, unfortunate but the only solution I know of right now.

Related Topic