Newer Version Available

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

force:recordSaveSuccess

Indicates that the record has been successfully saved.
force:recordSaveSuccess 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" onSaveSuccess="{!c.onSuccess}"/>
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}
This client-side controller handles the onSaveSuccess event by firing another event to refresh the component.
1onSuccess: function(component) {
2    var refresh = $A.get("e.force:refreshView");
3    refresh.fire();
4}

This event is supported in Salesforce1 only. If used outside of Salesforce1, this event won’t be handled properly.

Note