• Paul Mackintosh 4
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
The [Salesforce Console Integration Tookit][1] provides two functions for detecting switching focus of console tabs:

- `onFocusedPrimaryTab`
http://www.salesforce.com/us/developer/docs/api_console/Content/sforce_api_console_onfocusedprimarytab.htm
- `onFocusedSubtab` http://www.salesforce.com/us/developer/docs/api_console/Content/sforce_api_console_onfocusedsubtab.htm

I've been working on a Custom Visualforce Global Action and I'm able to use `onFocusedSubtab` without any issue to detect focus.  However `onFocusedPrimaryTab` does not work in the same way.  I have tested both functions using the samples from the documentation and I have no errors in Chrome dev tools that would indicate the callback is not being registered with `onFocusedPrimaryTab`.

The documentation does not indicate that they should behave differently, the only subtle hint that they may be different is that `onFocusedSubtab` is in the "Methods for Primary Tabs and Subtabs" section of the docs whilst `onFocusedPrimaryTab` is in the "Methods for Application-Level Custom Console Components" section.  For this reason I tried hooking up a callback in the console from a Custom Console Component in the highlights panel (top of Service Console), but it still didn't work.

Does anyone have any experience of `onFocusedPrimaryTab` working?

  [1]: http://www.salesforce.com/us/developer/docs/api_console/index.htm