Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

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

Name Type Description
callback function JavaScript 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:

Name Type Description
success boolean true if the link was set successfully, false if setting was unsuccessful.
callback function JavaScript method that’s called upon completion of the method.