Problem: Many users are able to see a form but few users are not able to see the form and getting error [object object].

I am using lightning:recordEditForm as below in lightning record page:

<lightning:recordEditForm aura:id="form" recordId="{!v.recordId}"
                    <!-- the messages component is for error messages -->
                    <lightning:messages />

     // lightning:inputField

While testing for different users, its working for most of the users but failing for very few users and getting UI like below:

enter image description here

When trying to debug (with breakpoint) the event from method handleFormError, I am getting below in console logs

"Cannot read property 'errorCode' of undefined"




"{"ok":false,"status":400,"statusText":"Bad Request","body":{}}"

Further, I am getting below error in console log after the record page is loaded.

KB {component: "markup://force:lds", componentStack: "[lightning:recordEditForm]", action: null, name: "AuraFriendlyError", message: "Error in fetching record or record metadata. [[object Object]]", …}

For the user, for his profile, all the fields used in form have editable permission for that specific record type and has access to record. App is normal (non-console). Object is Opportunity (and its custom fields).

PS: Pls let me know if any other info has to be added in question. Thanks in advance!

----------------------- EDITED ---------------------------------------

Event for very simple form like below, I am getting error for this user:

<lightning:recordEditForm recordId="{!v.recordId}"
        <lightning:messages />

        <lightning:outputField fieldName="Name" />
  • Can you add more details like user licence type? is it communites? Is it for all objects or just standard object? objectApiName is dynamic , is it possible for it to be wrong , or someone prvided wrong input? Commented Aug 11, 2019 at 19:33
  • Its Opportunity, and normal app (added in question). While loading in read/view mode itself, getting this error. Commented Aug 11, 2019 at 19:38
  • I feel it's related to some fields? Can you just have a single field Name in input and see if it works? Commented Aug 11, 2019 at 19:50
  • More like, user have access to those field(lookup), but no access to the lookup object /record. Commented Aug 11, 2019 at 19:57
  • It's actually just date time fields. But I will try that and see. Thanks for suggestion Commented Aug 11, 2019 at 20:05

1 Answer 1


Make sure you kept all the fields on the layout which you have referred in your lightning component. It was working for me.


You must log in to answer this question.

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