2

If you look at the metadata for a related list in a page layout, you might see something like this:

<relatedLists>
    <fields>Nopulous_Gateway__c</fields>
    <fields>Status__c</fields>
    <fields>Surripedous_Lair__c</fields>
    <fields>Contact__c</fields>
    <relatedList>Slomonious_Regency__c.Flubops__c</relatedList>
</relatedLists>

However, if you are using a standard object, some objects and fields will be in all-caps and will not reflect their API Names:

<relatedLists>
    <fields>TASK.SUBJECT</fields>
    <fields>TASK.WHO_NAME</fields>
    <fields>TASK.WHAT_NAME</fields>
    <fields>ACTIVITY.TASK</fields>
    <fields>TASK.DUE_DATE</fields>
    <fields>TASK.STATUS</fields>
    <fields>TASK.PRIORITY</fields>
    <fields>CORE.USERS.FULL_NAME</fields>
    <relatedList>RelatedActivityList</relatedList>
</relatedLists>

You see these same all-caps names used in report metadata.

Where are these all-caps names documented? If nowhere, what are the all-caps names that I can expect to see?

3
  • Just FYI, Nopulous, aside from being a rare surname, seems to be an infrequent OCR error for populous. Could not find Internet references for Slomonious or Surripedous Mar 29, 2017 at 15:15
  • @mods - This question has an older dupe that I only just found. That dupe does not have an answer. Shall this be closed as a dupe or the other? Mar 29, 2017 at 15:18

1 Answer 1

3

According to the documentation:

Field Name  Field Type  Description

fields      string[]    A list of fields displayed in the related list.
                        Retrieval of standard fields on related lists uses 
                        aliases instead of field or API names. For example, 
                        the Fax, Mobile, and Home Phone fields are retrieved 
                        as Phone2, Phone3, and Phone4, respectively.

They don't provide any documentation for a complete list of fields or their "aliases," nor is there an API defined that lets you get these values. As far as I know, the only way to figure out what the names are is to actually edit the page layout in the UI and then retrieve it via the metadata API.

2
  • Nice! This is definitely in line with their year-or-so-old "API-first" policy Mar 29, 2017 at 14:09
  • 1
    @CharlesKoppelman This feature has been like this ever since the metadata API has been a thing. The same thing happens in the Report API, too. It seems that the metadata API was only half-baked when it came out, while the newer APIs seem to be better. I wish they just had more consistency. The name we see in the UI is the name we expect. It shouldn't be that hard to translate those values for us.
    – sfdcfox
    Mar 29, 2017 at 14:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .