I have a page on console where case number is shown as hyperlink. When it is clicked it should open in the same tab which is primary tab. I created formula field using Hyperlink function.It is opening the case in new tab. How can I show the case in the same tab?

HYPERLINK('https://dev2.salesforce.com/console?tsid=02u50000000VVyQ#%2F'+ id,Casenumber)

I tried using _self,_top,_parent as third parameter, But they did not give me the result as I desired


You need to inject javacript to open the record in same tab.

Here is an example

HYPERLINK("javascript:if(typeof(srcUp)=='function') {srcSelf('/" & Id & "');} "+ 
" else {window.location.href='/" & Id & "'}" 
, "_self" 

For more information, refer my blog. Different ways of navigation


As per comment, take this approach, for create a Custom Button or Link executing JavaScript

var url = '/apex/VisualforcePage'; 
if (sforce.console.isInConsole()) { 
navigateToUrl(url + '?inline=1'); 
} else { 

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.