setTabLink()

Sets a console tab’s URL attribute to the location of the tab’s content. Use this method to generate secure console URLs when users navigate to tabs displaying content outside of the Salesforce domain.This method is only available in API version 28.0 or later.

Syntax 

1sforce.console.setTabLink((optional)callback:Function)

Arguments 

NameTypeDescription
callbackfunctionJavaScript method that’s called upon completion of the method.

Sample Code–Visualforce 

1<apex:page standardController="Account">
2    <apex: detail />
3        <apex:includeScript value="/support/console/68.0/integration.js"/>
4    <script type="text/javascript">
5        window.onload = function() {
6            sforce.console.setTabLink();
7             };
8  </script>
9</apex:page>

Response 

This method is asynchronous so it returns its response in an object in a callback method. The response object contains the following fields:

NameTypeDescription
successbooleantrue if the link was set successfully, false if setting was unsuccessful.
callbackfunctionJavaScript method that’s called upon completion of the method.