Newer Version Available

This content describes an older version of this product. View Latest

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/41.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.