0

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 ?

  • Then add account field as well on the layout to get the input from the user or remove the required check from this field. – itzmukeshy7 Aug 22 '18 at 11:47
  • Okay, that all is right, can you please share the code as well you are using to create the UI? – itzmukeshy7 Aug 22 '18 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 '18 at 13:59
1

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

  • 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? – Jitender Padda Sep 4 '18 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
  • Thanks but I'm a system administrator, shouldn't it be enough ? – osos9 Aug 23 '18 at 7:11
  • in that case also, please put field on Master profile. – Dhanik Lal Sahni Aug 24 '18 at 7:22

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.