When to Use the Salesforce Console Integration Toolkit
Change a Visualforce Page by Using the Salesforce Console Integration Toolkit
addEventListener()
fireEvent()
removeEventListener()
Previous Versions
JavaScript can be executed when certain types of events occur in a console, such as when a user closes a tab. The following standard events are supported:
| Event | Description | Payload |
|---|---|---|
sforce.console.ConsoleEvent.OPEN_TAB | Fired when a primary tab or subtab is opened. Available in API version 30.0 or later. |
|
sforce.console.ConsoleEvent.CLOSE_TAB | Fired when a primary tab or subtab with a specified ID in the additionalParams argument is closed. Or, fired when a primary tab or subtab with no specified ID is closed. Available in API version 30.0 or later. |
|
sforce.console.ConsoleEvent.CONSOLE_LOGOUT | Delays the execution of logging out of a console when a user clicks Logout. When Logout is clicked:
| None |
Adds a listener for a custom event type or a standard event type when the event is fired. This method adds a listener for custom event types in API version 25.0 or later; it adds a listener for standard event types in API version 30.0 or later.
Fires a custom event. This method is only available in API version 25.0 or later.
Removes a listener for a custom event type or a standard event type. This method removes a listener for custom event types in API version 25.0 or later; it removes a listener for standard event types in API version 30.0 or later.