2

I'm having trouble using the new lightning:recordForm component. Here is my code :

<aura:attribute 
  name="fieldsArray" 
  type="String[]" 
  default="['Name','Email','Phone','AccountId']" 
/>

<lightning:recordForm 
  aura:id="recordForm" 
  objectApiName="Account" 
  fields="{!v.fieldsArray}" 
  columns="2" 
  mode="edit" 
  onsubmit="{!c.handleSubmit}"
/>

There is no fields displayed. Only the buttons Cancel and Save.

I've tried to use that in an application and in a component of the utility bar. No success...

Any ideas ? Thanks !

  • have you checked the list of known issues on that component, there seems to be quite the list. – glls Jun 20 '18 at 3:57
  • do you have a link ? I'm struggling to filter the know issues only for that component... and only displaying 20 per page. – Lucas Ennouchi Jun 21 '18 at 21:13
  • @LucasEnnouchi It looks like they copied your code and used it as the repro... although, looks like this may only be an issue when previewing from the Developer Console (fingers crossed) success.salesforce.com/issues_view?id=a1p3A000000oAQnQAM – MayTheSForceBeWithYou Jun 27 '18 at 19:42
  • 'AccountId' is not a valid field. Maybe you were going for 'ParentId' or just 'Id'? Check that your controller/helpers also don't reference the non-existent 'AccountId'. – Brian Miller Jul 16 '18 at 19:57
1

your're propably missing recordId argument. Try :

<lightning:recordForm 
  recordId="{!v.recordId}"
  aura:id="recordForm" 
  objectApiName="Account" 
  fields="{!v.fieldsArray}" 
  columns="2" 
  mode="edit" 
  onsubmit="{!c.handleSubmit}"
/>

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.