This repository has been archived by the owner on Jan 27, 2024. It is now read-only.
Use Actual Related List Labels #1
Labels
enhancement ✨
A new feature suggestion or improvement upon an existing feature.
salesforce known issue ⚠️
A known issue with the Salesforce platform and likely not something the app can address.
Milestone
Due to limitation in Apex, the SObject Describe info only provides the API name of child relationships or the label of an object, not the label of the child relationship.
See this StackExchange post about the limitation.
This means if we have an object
Foo__c
with two lookup fields to objectBar__c
and each lookup field assigned different related list labels like "Mars Bars" and "Candy Bars" then Apex code isn't able to determine those labels. Instead, Apex SObject Describe info can tells us the API names likeMars_Bars__r
andCandy_Bars__r
or the labels of theBar__c
object itself: "Bar" (singular label) and "Bars" (plural label).For now, the app displays the plural label of the object the lookup field points to. It's not ideal, but better than nothing. If you mouse over the relationship name in the vertical navigation then the tooltip that displays includes the API name of the child relationship.
This means that if a child object has multiple lookup fields to the same parent object then the Related Files lightning component will display the parent object's plural label multiple times too.
Cory Cowgill suggests trying to use the User Interface API but I fear it may have same limitation as Apex.
The text was updated successfully, but these errors were encountered: