Newer Version Available

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

Connect to the Toolkit

The first portion of any JavaScript code that uses the Salesforce Console Integration Toolkit must make the toolkit available to the JavaScript code. The syntax for this is different depending on whether you are embedding JavaScript in a Visualforce page or in a third-party domain.

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.

Note

The version of the Salesforce Console Integration Toolkit is in the URL.

  • For Visualforce pages or any source other than a custom onclick JavaScript button, specify a <script> tag that points to the toolkit file.
    1<apex:page>
    2          <script src="/support/console/64.0/integration.js" type="text/javascript"></script>
    3     ...
    4</apex:page>

    For Visualforce, a relative path is sufficient to include integration.js, and is recommended.

  • For a third-party domain, insert this <script> tag.
    1<script src="https://MyDomainName--PackageName.vf.force.com/support/console/64.0/integration.js" type="text/javascript"></script>