You need to sign in to do that
Don't have an account?
SANKET KUMAR 28
Lightning Alternative of Window.Open() method, Window.Close() and window.onload() method in a Visualforce Page that is used in Lightning
When you run a Lightning experience readiness report, you will get a note that windows function will not work in Lightning.
I tried with apex:outputlink, sforce.one.navigation but the issue is when we redirect to the parent page from the child page, it gives a refreshed view of the parent page. But I have the scenario to keep the current state of parent and just close the child page tab.
One more thing, when we tried with apex:outputlink, we are not able to set the width and height of window, How we can achieve that?
similarly,
window.onload():- What is the tag available for Vf page that we can replace window.onload() using that tag ?
function Close1(){ window.close(); }
I tried with apex:outputlink, sforce.one.navigation but the issue is when we redirect to the parent page from the child page, it gives a refreshed view of the parent page. But I have the scenario to keep the current state of parent and just close the child page tab.
One more thing, when we tried with apex:outputlink, we are not able to set the width and height of window, How we can achieve that?
similarly,
window.onload():- What is the tag available for Vf page that we can replace window.onload() using that tag ?
Sorry for this issue you are facing.
For window.onload() You can do it like below ..
Move Your Onload login into the static resource .. use a
<ltng:require> afterScriptsLoaded to handler any logic
Thanks,
Nagendra
for this workaround to use vf page in both classic and lightning you can
write javascript function like this
sfoce differentiate lightning and classic experience in vf page