Skip to main content
1 of 3
Dileep
  • 33
  • 2
  • 7

How to refresh the account detail page from publisher action vf page

I have a vf page in the publisher action. in that vf page i have one update button.my requirement is that when i click on the update button, the account detail page should refresh. which is not happening. i have tried in following ways.but of no use.

function testRefreshPrimaryTabById() { //Get the value for 'scc-pt-0' from the openPrimaryTab method var primaryTabId = 'scc-pt-0'; sforce.console.getFocusedPrimaryTabId(showTabId); //sforce.console.getEnclosingTabId(testRefreshPrimaryTabById); //window.top.location = "/"; //window.location.href = 'url'; sforce.console.top.location.href = 'url';

    }
   var showTabId = function showTabId(result) 
{  
    var tabId = result.id;
    sforce.console.refreshPrimaryTabById(tabId , true, refreshSuccess);    
};

var refreshSuccess = function refreshSuccess(result) 
{
    //Report whether refreshing the primary tab was successful
    if (result.success == true) 
    {
        alert('Primary tab refreshed successfully');
    } 
    else 
    {
        alert('Primary did not refresh');
    }
};

whole console is refreshing which should not be. only one tab in which i am doing the update should refresh....so that detail page also refreshes.

any suggestions???

Dileep
  • 33
  • 2
  • 7