2

I am trying to get a label of Parent to Child relationship?

for (ChildRelationship child: Quote.sObjectType.getDescribe().getChildRelationships()) {
     System.debug(child.getRelationshipName());
}

but what I get is DeveloperName (Label without spaces) ActivityHistories, QuoteLineItems and what I want is Activity Histories, Quote Line Items.

How can I get that?

1 Answer 1

3

Instead of getRelationshipName() another methods should be used

for (ChildRelationship child: Quote.sObjectType.getDescribe().getChildRelationships()) {
     System.debug(child.getChildSObject().getDescribe().getLabelPlural());
}

You must log in to answer this question.

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