Activity › Forums › Salesforce® Discussions › What is the use of force:editRecord in lightning component?

  • What is the use of force:editRecord in lightning component?

    Posted by Nikita on October 3, 2019 at 2:22 PM

    What is the use of force:editRecord in lightning component?

    Saddam replied 7 years ago 2 Members · 1 Reply
  • 1 Reply
  • Saddam

    Member
    October 3, 2019 at 6:09 PM

    Hi,

    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.

    editRecord : function(component, event, helper) {
    var editRecordEvent = $A.get("e.force:editRecord");
    editRecordEvent.setParams({
    "recordId": component.get("v.contact.Id")
    });
    editRecordEvent.fire();
    }

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos