In communities, I have embedded a lightning components that edits the record in another form component and on save it redirects back to detail layout.
The problem I am facing is after update when it redirects, I can see old values, while when i Query/refresh page i can find new values.
Code used for redirection.
var urlEvent = $A.get("e.force:navigateToSObject");
urlEvent.setParams({
"recordId": oppId,
"slideDevName" :'related'
});
$A.get('e.force:refreshView').fire();/** Added as per suggestion **/
urlEvent.fire();
Somewhere in between Lightning container is showing me old values. Can someone give me some pointers on this issue?
Best Answer
$A.get('e.force:refreshView').fire(); This event or this code you are using in one.app that's why this is not working.
It’s supported in Lightning Experience and Salesforce1 only.
Refer it
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/ref_force_refreshView.htm