Navigate a user to a record page in edit mode in LWC
Let's look at how to Navigate a user to a record page in edit mode in LWC.
In case you are interested in navigating an user to the standard edit form on click of a button (not using quick actions) then we can use NavigationMixin
In a way, this is similar to e.force:editRecord
in Aura
Here is the snippet!
- We are importing
NavigationMixin
fromlightning/navigation
- We are providing a config object to
this[NavigationMixin.Navigate]
- The config object is going to have information about the destination. The key is providing
edit
for the keyactionName
Hope this helps!