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
TerryLuschenTerryLuschen 

Trying to refresh sub page within Service Cloud Console

I am trying to refresh a sub page within the Service Cloud Console.

 

I have learned how to make Javascript calls properly to these functions to get my current tab's ID and the primary tab's ID.   My call-back functions work fine.  

 

sforce.console.getEnclosingTabId(refreshtab2);

sforce.console.getEnclosingPrimaryTabId(refreshtab);

 

I can also get calls to close a tab and refresh a primary tab to work fine.

sforce.console.refreshPrimaryTabById(tabId, true);

sforce.console.closeTab(tabId);

 

The problem I have is I want to refresh a different sub tab, but I do not know the name of it.   Here is the call I am trying to make.

sforce.console.refreshSubtabByNameAndPrimaryTabId('NAME OF OTHER SUB TAB', tabID, false);

 

I know the tabID is correct because I know my call to getEnclosingPrimaryTabId is working properly.

 

The documentation says to use the Name parameter that was used with the openSubtab call. 

The problem is that I did not open the Sub-tab with a call.  It was opened by the Service Console itself as soon as the object is clicked on within the normal functionality of the Service Console.

 

I am trying to refresh the Account page when I know that a related list of a custom object has been changed.

 

The flow is this....

1) The user opens the Service Cloud Console

2) The user selects and opens an Account.   This creates a new Primary tab and  one Sub-Tab

3) The user clicks on a custom button on the Account that opens a new Visual Force window in a new Sub-Tab.  There are now two sub-tabs.

4) The user takes an action on this new sub-tab that will change the data on the first Account sub-tab.   

      I want to be able to  refresh the Account sub-tab since its data has changed.    It seems like some actions will automatically force a refresh on the Account tab like using hte standard buttons to create a new child object, but I am using a custom Visualforce page.

 

It seems to me that if the Service Console is opening the sub tabs that it is assigning an arbitrary name like scc-st-9.  

The last number seems to increment with each sub tab that is opened.   The primary tab's name seems to have the format scc-pt-0.

 

 I want the name of the sub-tab that is the Account.    I would know the Account id so I could use that if needed.

 

Any ideas?  

 

Thanks!

Terry Luschen

Dianna_In_VADianna_In_VA

I'm trying to do the same thing, but can't find any information on it. I not only want to refresh the main subtab, but I want to make the other subtab the focus. I can refresh the entire primary tab. which refreshes the content of all of the subtabs, but I can't figure out a way to change focus to the main subtab of the set--the tab with no name (at least not one that I set).

 

Actually, ideally, I would like to close the current subtab and go back to the main subtab in the set (after that main subtab has been refreshed).

SylverGSylverG

Hi, 

I am looking in too exactly the same issue at the moment. 

I need to close a Visual force tab (a custom Task one) and refresh the main Case tab.

Problem is that the refresh is making that i can not get to the close code section and the close is making that I can not reach the refresh section. They are mutually excluding. 

I am thinking that if I can refresh the subtab rather than the primary one (as this is not really the one I want to refresh, it is a subtab that needs refresh), my subtab will not be refreshed and I can then reach my close code set. I however can not find the name of the subtab to update.

Did you find a way out of this?

Thx

G

TerryLuschenTerryLuschen

Sorry, but I have not found a solution yet.   We were hoping that the spring 12 release would help with this, but we have not found a way yet.

arunadeveloperarunadeveloper

Hi,

 

I am also having same problem.

i am trying to refresh my primary tab and close the subtab.

below is the code which i am trying to do.

could you please assist me on this, if you have any code samples please share with me.

 

function RefreshPrimaryTabByName() {

var primaryTabName = "{!Case.Contact.Name}";

sforce.console.refreshPrimaryTabByName(primaryTabName, true, refreshSuccess,closeCurrTab());

}

var refreshSuccess = function refreshSuccess(result) {

if (result.success == true) {

//alert('Primary tab refreshed successfully');

} else {

//alert('Primary tab did not refresh');

}

};

function closeCurrTab() {

sforce.console.getEnclosingTabId(closeCurrTabById);

}

var closeCurrTabById = function closeCurrTabById(result) {

sforce.console.closeTab(result.id);

};

 

Thank you,