I have a lightning:recordEditForm containing lightning:inputFields that I want to use to create a simple custom object. The 3 fields are:

  • A picklist
  • A lookup to Contact
  • A lookup to Account

presented like this:

<lightning:recordEditForm objectApiName="MyObject__c">
    <lightning:messages />
    <lightning:inputField fieldName="Type__c" />
    <lightning:inputField fieldName="Contact__c"/>
    <lightning:inputField fieldName="Account__c"/>
    <lightning:button  variant="brand" class="btn" type="submit" label="Create" />

The lookup fields work to some degree except that the generated HTML has and displays as placeholder:


and this text is displayed at the top of the list of recent objects:


and when there are no matching search results this text is displayed that is a working link to a more comprehensive search/add UI:


and only the FirstName is displayed in the list of matches for the Contact lookup not the Name.

And double clicking after the selection has been made blows up the page.

Looks like incomplete code; I'm working in a scratch org created on 8 Feb 2018: is this working fully for anyone?


The submit is also failing. I see this via the onsubmit event (note that cvux__Intake__c has a defined Id value here):


and get a bland error message displayed that inside the onerror has more detail:

"data":{"message":"An error occurred while trying to update the record. Please try again.","statusCode":400,"enhancedErrorType":"RecordError","output":{"errors":[],"fieldErrors":{"cvux__Intake__c":[{"constituentField":null,"duplicateRecordError":null,"errorCode":"REQUIRED_FIELD_MISSING","field":"cvux__Intake__c","fieldLabel":"Intake","message":"Required fields are missing: [cvux__Intake__c]"}]}}},"id":"-829756038"}},"target":{},"currentTarget":{}}"

where cvux__Intake__c is a master-detail to a parent object reported as missing.


Changing the cvux__Intake__c to a lookup fixes the submit problem.

  • This is a bug i feel and had no luck with it so far . – Mohith Shrivastava Feb 8 '18 at 16:17
  • 3
    @MohithShrivastava Yes and looking like perhaps more than one... – Keith C Feb 8 '18 at 16:29
  • Have you tried the strike lookup component? It fixed most of the issues for me except the New Record function. It's here: lightningstrike.io/#!/strikeLookup – Mossi Feb 11 '18 at 1:04
  • 1
    @Mossi Yep a 3rd party solution may be the way to go. I've created a case with Salesforce though as this feature isn't released yet I'm not optimistic that the case will help much. – Keith C Feb 11 '18 at 12:07
  • After the summer 19 release. I am also facing this issue now :( – Ratan Paul Jun 16 '19 at 11:15

For now quick fix is CHECK "Allow reparenting" checkbox for the Master-Detail field on the child object. You will not get error


Disable the debug mode for lightning components.That should solve the issue.

  • 2
    (Surprisingly) unchecking "Enable Debug Mode" in the "Lightning Components" Setup UI did remove the placeholder text though did not replace that with appropriate text or icons. Didn't address the other problems though. – Keith C Feb 13 '18 at 17:51
  • For icon overriding the txt , we used the css padding property and moved the text 20px . Seems to look better now and not overriding the text – Ravi Narayanan Feb 14 '18 at 18:32

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.