Newer Version Available
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 “Customize a Console with Custom Components in Salesforce Classic” in the Salesforce online help.
- 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, when you embed a Visualforce page into a page layout or use a custom quick action in a feed, the API method works as expected. However, if Development Mode is enabled in your org, the API method doesn't work because an iFrame is automatically added.