2

I have a requirement where I need to show some record's fields within a component in account's detail page. Because of some UI requirement we are showing some fields via ligtning:recordViewForm and one field via force:recordData targetFields attribute like this

<force:recordData   aura:id="addrRecord"
                        layoutType="FULL"
                        recordId="{!v.addressObj.Id}"
                        targetFields ="{!v.addressRecordLds}"
                        targetRecord="{!v.recordObj}"
                        />

and referring to picklist field address type like this {!v.addressRecordLds.Address_Type__c} . But it always returns the field value in English not in locale specific language. What am I missing ?

2
  • If you you the standard Salesforce translation (translation workbench + set the locale of the appropriate user) - this should work out of the box Mar 14, 2019 at 10:43
  • Those settings are already in place, but still it doesn't work Mar 14, 2019 at 11:13

1 Answer 1

1

You can access the translated values with force:recordData by utilizing the targetRecord attribute. Instead of {! v.addressRecordLds.Address_Type__c }, use the following.

{! v.recordObj.fields.Address_Type__c.displayValue }

You must log in to answer this question.

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