Newer Version Available

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

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.
  • 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().
  • For information on how you can customize, extend, or integrate the sidebars of the Salesforce console using Visualforce, see “Console Components” in the Salesforce online help.
  • To enable the toolkit for third-party domains, add the domains to the whitelist of the Salesforce console. See “Whitelist Domains for a Salesforce Console” in the Salesforce online help.
  • When working with the Salesforce Console Integration Toolkit, we recommend that you keep in mind that it doesn’t support nested iframes.