You need to sign in to do that
Don't have an account?
Soham_Mehta
Callback event on $A.get('e.force:editRecord') in lightning
I'm using $A.get('e.force:editRecord') to display standard lightning edit modal window. I want to refresh my component after user saves the given record. However there are no callback events documented by salesforce on record save success for e.force:editRecord.
By using chrome lighting inspector tool I found two events getting fired when I clicked on Save button.
1. force:recordChange (Application Event)
2. force:save (Component Event)
I declared an application event handler for force:recordChange
<aura:handler event="force:recordChange" action="{!c.handleRecordChange}"/>
Got following error
[ERROR]: No EVENT named recordChange found: Source
To handle component event force:save I have to specify event name
<aura:handler name="?" event="force:save" action="{!c.handleRecordSave}"/>
How do I notify custom component when user saves the record.
By using chrome lighting inspector tool I found two events getting fired when I clicked on Save button.
1. force:recordChange (Application Event)
2. force:save (Component Event)
I declared an application event handler for force:recordChange
<aura:handler event="force:recordChange" action="{!c.handleRecordChange}"/>
Got following error
[ERROR]: No EVENT named recordChange found: Source
To handle component event force:save I have to specify event name
<aura:handler name="?" event="force:save" action="{!c.handleRecordSave}"/>
How do I notify custom component when user saves the record.
To refresh a view, run which reloads all data for the view.May I also request you, please check with below link which might help.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_force_recordSaveSuccess.htm
Hope this helps.
Regards,
Nagendra.
I have the same problem and I posted an idea to success platform:
https://success.salesforce.com/ideaView?id=0873A000000CQQiQAO
Feel free to vote ;)
Cheers!
Flo
There is no Standard Method to refresh view or reload the component after firing $A.get('e.force:editRecord').
But I have find a trick for it . Whenever $A.get('e.force:editRecord') is fired it shows a Toast Messege.
Add below code in your component. Add below code in your JS controller. This will refresh the page after the standard toast messege is displayed by $A.get('e.force:editRecord').
The solution above is tested and working good.
Hope this helps.
Regards,
Sanket Vidhate.
give a thumb up!
much needed!!!!!Thank you.