function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LakshmanLakshman 

Is there any way to know in which tab the user is through VFP?

Hi All,

 

I want know in which tab is user in through VFP. My details scenario is as follows:

 

I have a Case Pgae Layout within which we have a visualforce page. This Case Layout can be accessed by Case tab and also through console. So my question is how can I know where is User present in Console tab or in Case tab. Any working example to achieve this would be highly appreciated.

 

Regards,

Lakshman

Sunny_SlpSunny_Slp

If someone else doesn't reply, you could perhaps try this

 

This is not a solution(or even a correct way), more of a quick fix but you can perhaps use parent.locaiton function of javascript and if returned URL has the parameter "isdtp=mn"  then it could be a console?

 

as I have said, this is not a solution. isdtp can be used elsewhere too but since you're only concerned with case tab and console...this 'might' work.

LakshmanLakshman

Hi Sunny,

 

Thanks for your reply.

When I try to read parent.location or window.parent.location or window.top.location, I am getting script error. Is it a XSS policy issue(Browser issue) which is blocking me to access the parent url. Please let me know if you have an example or tried implementing it and succeeded. I need to get a solution quickly and It would be highly appreciated if you or anyone get me a solution to this.

Thank you!

 

Regards,

Lakshman.