No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Methods for Console Events
JavaScript can be executed when certain types of events occur in
the console, such as when a user closes a tab. The following standard
events are supported in API version 30.0 or later:
| Event | Description | Payload |
|---|---|---|
| sforce.console.ConsoleEvent.OPEN_TAB | Fired when a primary tab or subtab is opened. |
|
| 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. |
|
You can use the following methods for console events:
| Method | Description |
|---|---|
| addEventListener() | 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. |
| fireEvent() | Fires a custom event. This method is only available in API version 25.0 or later. |
| removeEventListener() | 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. |