I have a visualforce page. I need to open that page in Service Cloud Console sub-tab when user is within Service Cloud Console with some required parameters and if user is not within console then the page should be open in the SF Classic.

Thanks in Advance!!

  • There's a thread on developer force forums that addresses this, I haven't tested the final "agreed" format but it'd be a good place for you to start! developer.salesforce.com/forums/?id=906F00000008w2ZIAQ Feb 10 '16 at 7:59
  • How are you opening that page? Custom link, custom button, etc...? There are a few ways to do it, depending on what your flow is. The below example is for a custom button, but you could use the same sforce.console.isInConsole() method as well depending on how you are opening the page in the first place. success.salesforce.com/ideaView?id=08730000000kpcfAAA
    – Paul H.
    Feb 10 '16 at 23:46

Thanks All!!

Below formula is working for me

     srcUp('/apex/SL_MyPage?p=" & Custom__r.Id & "&d=" & Custom__c&"');}
"+" else {window.location.href='/apex/SL_MyPage?p=" & Custom__r.Id & "&d=" & Custom__c&"'}", 
"Formula Label"),"_self")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.