1

Apologies if I am asking a stupid question here, but here is my scenario:

I have a custom object, say A, which has two lookups: One to a standard object (Lead) and,
Another to a custom object, say B.

The name of the two lookups on A are B__c and Lead__c.

Now, on the related list for A on Lead's page-layout, how can I show the fields belonging to B? Is it even possible? The user interface doesn't seem to allow me to do this, but I was trying to use something like:

<relatedLists>
    <fields>B__c.some_custom_field__c</fields>
    <relatedList>A__c.Lead__c</relatedList>
</relatedLists>

in the layout metadata file, but it doesn't work. I get a message that says something like:
Invalid field in related list...

Thanks in advance!

0

You cannot show complete related list. However, you can show only fields.

To get fields from B to A, use the below fields

A__c.B__r.Name

A__c.B__r.Id

A__c.B__r.someCustomFieldOnB__c
  • in addition to sfdcFanBoy's answer, if you are able to convert B's relationship field from look up to master detail on A object, you dont need formula fields. you can easily put B's fields on related list on Lead page layout. – erkan çipil May 16 '16 at 8:45

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.