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?

  • just to confirm its not person account record type? – Pranay Jaiswal Jun 19 '18 at 15:08
  • correct - regular accounts with record types – BritishBoyinDC Jun 19 '18 at 16:31
0

Just found out that this is now a know issue:

| improve this answer | |

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.