my goal is to keep only one contact TAB opened in Console all the time , if there is already a tab opened i need to close it and open the new tab.

I have a VF section on standard detail page and i added addEventListener for OPEN_TAB. When the EventListener function executes on TAB open getting the error saying un supported API function. does it means i can't add EventListener on a VF section? if so is there in other work around for this?

function getAllTabIds() {
        // get all Tab ID's 
    var closeAlltabs = function closeAlltabs(results) {

       alert('closeAlltabs Called'+result.ids);
        var tabId = result.id;
     getAllTabIds, { tabId : sforce.console.getEnclosingTabId() });

1 Answer 1


Bit late, but hopefully this might be useful in the future.

The sforce.console object in embedded VF pages on standard layouts doesn't support adding listeners if you're using Integration Toolkit v 30 or above. Since you want to listen for the standard OPEN_TAB event, I guess lowering the version is not an option.

The workaround I can think of is to implement the listener code on a Custom Console Component which is linked linked to a VF page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .