You need to sign in to do that
Don't have an account?
Sid_C
Detecting Console in Home Page Component VF Page?
Does anyone know a way to detect console mode from a home page component (VF Page)? We have a visual force page, added as a wide home page component. Within the page JS, we are trying to detect whether the page is in console using "sforce.console.isInConsole()". But this does not seem to work. Any suggestions?
The issue was with the page url being set in the home page component. We were earlier using
<iframe src="/apex/SamplePage?core.apexpages.devmode.url=1" id="samplePage" width="100%" frameborder="0" height="100"></iframe>.
So the SamplePage JS, always assumed the page to be in non-console mode.
The fix was to check within the wide-component JS if we were in console mode. If so then add "&isdtp=vw" to the url, and then display in the iframe. This way the IsInConsole function in the SamplePage JS worked fine.
Hope this helps anyone else facing this issue.
All Answers
Thanks
The issue was with the page url being set in the home page component. We were earlier using
<iframe src="/apex/SamplePage?core.apexpages.devmode.url=1" id="samplePage" width="100%" frameborder="0" height="100"></iframe>.
So the SamplePage JS, always assumed the page to be in non-console mode.
The fix was to check within the wide-component JS if we were in console mode. If so then add "&isdtp=vw" to the url, and then display in the iframe. This way the IsInConsole function in the SamplePage JS worked fine.
Hope this helps anyone else facing this issue.