1

I'm developing a custom lightning component which has a form to create a record (of a custom object) using lightning:recordEditForm and lightning:inputField.

One of the fields is the Account lookup field which is required.

I'm pre populating the field with the id and I can see in the UI that it's populated with the correct account but once I submit the form I get an error: Required fields are missing: [Account__c]

I also tried to remove the pre populate value and even if choose an account by myself I still get the error.

Does anyone know this problem and know what to do in that case ?

3
  • Then add account field as well on the layout to get the input from the user or remove the required check from this field. Aug 22, 2018 at 11:47
  • Okay, that all is right, can you please share the code as well you are using to create the UI? Aug 22, 2018 at 12:14
  • @osos9, please share your code - and is possible the pertinent JSON of when the record is submitted. Please keep in mind that users in the community are trying to help - comments such as 'your answer is not helpful at all' tend to be unfriendly, a mere 'thank you but this does not answer my question' would be considered more appropriate. Thanks
    – glls
    Aug 22, 2018 at 13:59

2 Answers 2

2

Checking the "Reparentable Master Detail" on the field solved the problem.

1
  • Even though this works, it isn't desirable to have to change something internally because of a development component. Shouldn't there be a proper fix from SF? Sep 4, 2018 at 6:18
0

You can try below options. I have faced similar issues while working in Lightning community

  1. Some time issue occurs due to field not available on Page layout with specific record type. Put field on Page layout.
  2. Check field permission to specific profile as well as Master Profile
  3. Give access to record type in profile
2
  • Thanks but I'm a system administrator, shouldn't it be enough ?
    – osos9
    Aug 23, 2018 at 7:11
  • in that case also, please put field on Master profile. Aug 24, 2018 at 7:22

You must log in to answer this question.

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