I was just about to write some custom code in order to re-create parts of a SFDC page layout in JavaScript. Getting through the sections and fields of the page layout seems to be pretty manageable, but then I got to the related lists. Just reading through the Metadata API Developer Guide it states:
- 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.
I mean, who needs aliases for the fields? How does one get the API name of a field so that later can retrieve the actual data in order to populate that related list? I could not work out a way to find any relationship between a field's API name and it's alias. I even checked the DescribeFieldResult class, and could not find any references to a field's alias (thought I could map it somehow). Has anyone got a solution for this?