4

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?

  • I'm having the same problem, seems like most of the fields just replace camel-case with underscores but there are some fields that are entirely different like Address1 vs MailingAddress. I cant see how this column metadata is useful if there isnt an answer to this problem... – Boog Jun 18 '14 at 16:41
  • Here is the permalink for Boog's thread: developer.salesforce.com/forums/?id=906F0000000AYgzIAG – Jonas Jun 23 '14 at 12:20
4

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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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