So i am building LWC which i need to be able to edit fields on some records. I did add record-form element and it does work and render records but there is no way to edit them. As it is written in documentation fields in standard view mode should be displayed with edit icon on right side of the field allowing to enter edit mode.
I used this element for one custom object and standard one ( QuoteLineItem ) and had same result. Any one had similar problem? ( the fields displayed are controlled by compact layout and i do not want to use mode = edit cause it starts with buttons showed and i do not want to see them until user will click on field to edit something ).
Code:
<lightning-record-form record-id={_theQlListElement.Id} object-api-name={prObject} columns="3" layout-type="Compact"></lightning-record-form>
Best Answer
Inline Edit Fields
Viewing a Record with Option to Edit Fields
Edit Mode
As per documentation
Please find below the example for the same.
HTML
JS
You can override the standard save functionality using
onsave
event.Refer