Edit Record

force:editRecord

Displays the record edit screen for a given record.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App

This event opens a page to edit the record specified by recordId.

To display the record edit page for an object, set the object name on the recordId attribute and fire the event. This example displays the record edit page for a contact that’s specified by recordId.

This example displays the record create panel for contacts.

This event is handled by the one.app container. It’s supported in Lightning Experience, the Salesforce mobile app, and Aura-based Experience Builder sites.

NameDescriptionTypeDefaultRequired
recordIdThe ID of the record to be editedstringYes