Record Save

force:recordSave

Saves the record for the force:recordEdit component.

For Use In

Lightning Experience, Experience Builder Sites, Salesforce Mobile App

This event is handled by the force:recordEdit component. This example shows a force:recordEdit component, which takes in user input to update a record specified by the recordId attribute. The button fires the force:recordSave event.

1<force:recordEdit aura:id="edit" recordId="003R00000000000000"/>
2<lightning:button label="Save" onclick="{!c.save}"/>

This client-side controller fires the event to save the record.

1save : function(component, event, helper) {
2      component.find("edit").get("e.recordSave").fire();
3      }

We recommend using lightning:inputField for a record edit layout that uses Lightning Data Service and Lightning Design System, and provides error handling out-of-the-box.

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.

No specifications to show