1

I am using the new Lightning:recordForm with a list of fields.

    <lightning:recordForm
     objectApiName="Account"
     recordTypeId ="{!v.rtTypeId}"
     fields="{!v.acctFields}"
     columns="2"
     mode="edit" 
     onload = "{!c.handleOnload}" />

One of the fields in the field list is BillingAddress, and it does correctly display the Billing Address fields as a compound address:

enter image description here

But as you will see, it doesn't default the value for Billing Country Code correctly. Looking in the onload logs, it is getting the value of US, just not the displayValue. I was thinking I could doing something like this in the onload and set the default, but it isn't working:

 var response = event.getParams();
 var fields = response.record.fields;
 console.log(fields.BillingCountryCode.value); //US
 console.log(fields.BillingCountryCode.displayValue); //null
 fields.BillingCountryCode.displayValue = 'United States';//doesn't work

Anyone know how to either a) get the default to work, or b) set the displayValue to United States?

2
  • just to confirm its not person account record type? Commented Jun 19, 2018 at 15:08
  • correct - regular accounts with record types Commented Jun 19, 2018 at 16:31

1 Answer 1

0

Just found out that this is now a know issue:

You must log in to answer this question.

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