Newer Version Available

This content describes an older version of this product. View Latest

force:recordSave

Saves a record.
force:recordSave is handled by the force:recordEdit component. This examples 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="a02D0000006V8Ni"/>
2<ui:button label="Save" press="{!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    // Update the component
4    helper.getRecords(component);	
5}

This event is handled by the one.app container. It’s supported in Lightning Experience and Salesforce1 only.

Note