You need to sign in to do that
Don't have an account?
Dnyanesh Sable 10
I have created one Aura component and I added beforeunload event in init function so i am not able to catch beforunload evetn when i refresh the community page.
I have created one Aura component and I added beforeunload event in the init function so I am not able to catch beforunload event when I refresh the community page.
It is working in the normal salesforce page when Tab is getting close, the Browser is getting close and even refresh the page.
But when we use it in community page there is not working for a refresh. it is not a calling function.
Please can anyone help?
Thanks!
It is working in the normal salesforce page when Tab is getting close, the Browser is getting close and even refresh the page.
But when we use it in community page there is not working for a refresh. it is not a calling function.
Please can anyone help?
Thanks!
doInit : function(component, event, helper) { var closeCase = function(event){ helper.handleCloseCase(component, event, helper); } window.parent.addEventListener('unload', closeCase); }
In order to avoid such issues, please ensure that any users accessing a component that queries the Object in the controller (even if they don't use the functions in those controllers) have at least read access to the object
@Dnyanesh Sable 10 - Did you get your code to work even on browser close? I have tried this within an Aura component within a Service Console app and it does not fire when closing the actual browser. Any ideas?
My code is:
Aura Controller:
Aura Helper: