1

I'm getting an error when I cut and paste the lightning-record-edit-form from https://developer.salesforce.com/docs/component-library/bundle/lightning-record-edit-form/documentation

I've changed record-id to a legal value on my org.

 <lightning-record-edit-form 
      record-id="0126A000000VIAKQA4"
      object-api-name="Contact">
       <lightning-messages>
       </lightning-messages>
       <lightning-output-field field-name="AccountId">
       </lightning-output-field>
       <lightning-input-field field-name="FirstName">
       </lightning-input-field>
       <lightning-input-field field-name="LastName">
       </lightning-input-field>
       <lightning-input-field field-name="Email">
       </lightning-input-field>
       <lightning-button
            class="slds-m-top_small"
            variant="brand"
            type="submit"
            name="update"
            label="Update">
        </lightning-button>
    </lightning-record-edit-form>

And I'm seeing this error. Contact is the same API name used in the example. I'm at a loss to think what might be wrong with it?

error from

3

What kind of Id is the one in the record-id attribute ? Is it a Id from a Contact record of your org ? If not, this is the problem here ! You have to put a Contact Record Id for this attribute

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.