function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
JayseJayse 

Service Cloud Console - catch when a tab is closed

Hi All,

 

I have a requirement to have a pop up window appear when a user attempts to close a tab on the service console, in this instance without updating a case.

 

I am struggling to find a way to consistiently catch whether the user has closed a tab on the console. I have tried using the 

sforce.console.onFocusedPrimaryTab() method, but a) it doesn't consistienly fire (ie. when there is only 1 tab and the dashboard on the console); and b) the javascript I have tried adding to see whether a tab has actually been closed when the focus of the console changes doesn't work either (with some strange behaviour of basic javascript functions (String.split) not working full stop).

 

Is there a standard method to capture this (I have seen this question previously asked, but with no answer).

 

or

 

Has someone managed to implement this, in which case some guidance would be much appreciated. *

 

* this is based on taking my current approach to determine what tabs are on the console when the primary tab focus changes. is there an easy way to distingush that a user has selected a different tab or opened a new one rather than closing one down (at which point i'd need to invoke my business logic).

 

Many thanks in advance.