You need to sign in to do that
Don't have an account?
Debabrata Bera
$A.get('e.force:refreshView').fire(); - giving undefined error in lightning.
$A.get('e.force:refreshView').fire();
I am getting error - 'Cannot read property 'fire' of undefined'. This is weired. Plz help me if you have any suitable answer.
I am getting error - 'Cannot read property 'fire' of undefined'. This is weired. Plz help me if you have any suitable answer.
Greetings to you!
The default refreshView event is only available within the Lightning Experience and Salesforce mobile app. If you want to use the event within a custom lightning app ( .app) you have to handle the event manually and cannot use the out-of-the-box behavior.
So, in your component, you need to handle the event.
And in the controller, you can fire the event.
For more information refer below link.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one.htm
Also, Lightning statndard events like $A.get("e.force:refreshView").fire(); are not supported when lightning component is used in visualforce pages.
If the problem still persists, I suggest you please share your complete code.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
All Answers
Greetings to you!
The default refreshView event is only available within the Lightning Experience and Salesforce mobile app. If you want to use the event within a custom lightning app ( .app) you have to handle the event manually and cannot use the out-of-the-box behavior.
So, in your component, you need to handle the event.
And in the controller, you can fire the event.
For more information refer below link.
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/events_one.htm
Also, Lightning statndard events like $A.get("e.force:refreshView").fire(); are not supported when lightning component is used in visualforce pages.
If the problem still persists, I suggest you please share your complete code.
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
to reload my entire page. Works like a charm. Love the native javascript :)