<aura:attribute name="recordId" type="String" default="a02D0000006V8Ni"/> <aura:attribute name="saveState" type="String" default="UNSAVED" /> <aura:handler name="onSaveSuccess" event="force:recordSaveSuccess" action="{!c.handleSaveSuccess}"/> <force:recordEdit aura:id="edit" recordId="{!v.recordId}" /> <ui:button label="Save" press="{!c.save}"/> Record save status: {!v.saveState}
This client-side controller fires the event to save the record and handle it accordingly.
({ save : function(cmp, event) { // Save the record cmp.find("edit").get("e.recordSave").fire(); }, handleSaveSuccess : function(cmp, event) { // Display the save status cmp.set("v.saveState", "SAVED"); } })