0

When using lightning:recordEditForm I am getting the following error in the <lightning:messages />:

Field does not exist.

Here is the markup I am using:

<lightning:recordEditForm aura:id="trainingRecordEditForm"
                                              recordId="{!v.currentlySelectedId}"
                                              objectApiName="{!v.objectApiName}"
                                              onsuccess="{!c.handleSuccess}" onerror="{!c.handleError}">
                        <lightning:messages />

                        <aura:iteration items="{!v.fields}" var="field">
                            <lightning:inputField fieldName="{!field}" />
                        </aura:iteration>

                        <lightning:inputField class="hiddenField"
                                              fieldName="{!v.fieldWithParentId}"
                                              value="{!v.currentlySelectedId}"/>

                    </lightning:recordEditForm>

Nothing special, really.

Here is the params of the error event: "{"error":{"message":"Field does not exist.","stackTrace":"","data":{"message":"Field does not exist.","statusCode":400,"errorCode":"POST_BODY_PARSE_ERROR"},"id":"1408552758"}}"

What I am doing more precisely:

  1. I open the component successfully.

  2. Change nothing in the fields.

  3. Click button which submits the <lightning:recordEditForm>.

enter image description here

  • If your fields are not generated with an aura iteration does it work? – glls Aug 18 '18 at 12:43
0

Here <lightning:inputField class="hiddenField" fieldName="{!v.fieldWithParentId}" value="{!v.currentlySelectedId}"/> I had v.fieldWithParentId being equal to an empty string.

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.