Is there a way to reload the Lightning page after saving the record detail? I have embedded a custom Lightning component on the Lightning page and trying to reload the page to use the updated field values on the record.
[SalesForce] Reload record detail lightning page on edit
Related Topic
- [SalesForce] Lightning RefreshView event not working on record detail page
- [SalesForce] Navigating to record detail page after edit does not reflect new data
- [SalesForce] How to include a lightning component in a record detail page in salesforce1
- [SalesForce] Reload Visualforce page on value change in Lightning Component inside
- [SalesForce] Refresh parent lightning component detail page from embedded lightning component
- [SalesForce] How to reload a custom lightning component within a lightning page
- [SalesForce] On save navigate to record detail page
Best Answer
Use below code, if success is returned below code line should be fired. $A.get("e.force:refreshView").fire();
A sample method can be written as
} https://developer.salesforce.com/docs/component-library/bundle/force:refreshView/documentation
Are you in the context of a custom lightning app? The default refreshView event is only available within the Lightning Experience / mobile Salesforce-App context. Say if you want to use the event within a .app you have to register and handle the event manually and cannot use the out-of-the-box behaviour.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one.htm