Salesforce Console Integration Toolkit Best Practices

Salesforce recommends that you adhere to a few best practices as you use the Salesforce Console Integration Toolkit.
  • Many of the methods in the Salesforce Console Integration Toolkit are asynchronous and return their results using a callback method. We recommend that you refer to the documentation for each method to understand the information for each response.
  • Errors generated by the Salesforce Console Integration Toolkit are typically emitted in a way that doesn't halt JavaScript processing. Therefore, we recommend that you use a tool such as Firebug for Firefox to monitor the JavaScript console and to help you debug your code.
  • Due to third-party cookie restrictions in modern web browsers, Visualforce pages can’t load in Salesforce Classic console apps when third-party cookies are disabled. See Visualforce Limitations in Salesforce Classic When Third-Party Cookies are Blocked.
  • To display Visualforce pages properly in the Salesforce Console, we recommend you:
    • Accept the default setting showHeader="true" and set sidebar="false" on the apex:page tag.
    • Set Behavior on custom buttons and links that include methods from the toolkit to display in an existing window without a sidebar or header. For more information, see Define Custom Buttons and Links” in the Salesforce online help.
  • When using Firefox, we recommend that you don't call closeTab() on a tab with an active alert box because the browser may not load properly.
  • Duplicate tabs might open when users initiate methods with invalid URLs. We recommend that you check URLs for validity before you include them in methods.
  • To prevent External Page from displaying as a tab name, we recommend that you specify the tabLabel argument on methods such as openPrimaryTab() and openSubtab().
  • To enable the toolkit for third-party domains, add the domains to the allowlist of the Salesforce console.
  • The Salesforce Console Integration Toolkit methods don't work in nested iframes. For example, if you use a custom quick action in a feed, the methods still work as expected because the feed is in a single iframe. But if Development Mode is also enabled in your org, the methods no longer work because the iframe of the feed is nested inside the Development Mode iframe.