2

I am using lightning:recordEditForm to display form for User object, below is my code. OOTO_Delegate__c is a self lookup field. Upon printing error in console I see

'{"message":"Cannot read property 'value' of undefined","detail":"","output":{},"error":{}}'

The field is also present on layout.

<lightning:recordEditForm
                              onload="{!c.handleLoad}"
                              onsuccess="{!c.handleSuccess}"
                              onerror="{!c.handleError}"                  
                              recordId="{!$SObjectType.CurrentUser.Id}"
                              objectApiName="User">
        <lightning:messages />

        <lightning:inputField fieldName="Currently_OOTO__c" aura:id="currentooo"/>

        <lightning:inputField fieldName="OOTO_Delegate__c" />

        <div class="slds-m-top_medium">
            <lightning:button disabled="{!v.disabled}" variant="brand" type="submit" name="save" label="Save" />
        </div>
    </lightning:recordEditForm>

enter image description here

It is only happening with User object and custom Hierarichal relationship field. I tried with ManagerId and it was working fine but when I create another custom field and use that, same error appears. another thing to note is, error only appears if LC is opened in Utility bar

1 Answer 1

0

It was resolved by adding self lookup field to User Profile Layout

1
  • I am having the same issue with the lightning:recordEditForm on the Order object. I have added all the fields to the page layout, but I am still getting the error every few tries. The error message is the same as the one you posted.
    – Maya Tran
    Apr 21, 2020 at 18:29

You must log in to answer this question.

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