How can i display error message that will come on submitting the form and also how will can we Handle creating a new record in lwc anyone has any examples ?

PS. I am using lightning-record-edit-form to bind the layout level required fields to show up correctly in the form.


I believe your question is fully addressed by the documentation:

  1. Errors can be captured by handling the error custom event. You can then display those in a toast.
  2. Creating records simply requires you not to pass an ID, just the object type.

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.