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
nagalakshminagalakshmi 

How to know the vf page is running from Service console

Hi,

I am redirecting to record url when the submit button is clicked from vf page. This is working fine in non service cloud and service cloud. 
But in service cloud, url is redirected to record and it is looking like non service cloud. It is coming out from service console. So i need to redirect to to the record of service console. How can i solve this issue.

Is there any direct method to know whether the console is service or not?? from apex class. Please help me out.Thanks in advance

Thanks,
Lakshmi
VIVEK 998VIVEK 998
Hi nagalakshmi,
you can use this method in javascript "sforce.console.isInConsole()" to check whether its in console or not.
Alternate solution for this could be :

<script type="text/javascript">
function checkConsole() {
if (typeof(srcUp) == 'function')
{
return false; //yes in console
} else {
return true;
} }

Hope it helps!
Vivek