You need to sign in to do that
Don't have an account?

refreshPrimarytabById not working in service console
Hi,
I am trying to refresh a case record tab from an inline VF page in Case. I am fetching the corresponding case tab Id using "enclosingPrimaryTab" and trying to refresh the corresponding case record tab. "refreshPrimaryTabById" not working in this case.
Has anyone tried using "refreshPrimaryTabById"? Please provide your suggestion.
Thanks
Sureka
I am trying to refresh a case record tab from an inline VF page in Case. I am fetching the corresponding case tab Id using "enclosingPrimaryTab" and trying to refresh the corresponding case record tab. "refreshPrimaryTabById" not working in this case.
Has anyone tried using "refreshPrimaryTabById"? Please provide your suggestion.
Thanks
Sureka
You can call the js code by Button so like below :-
<apex:commandButton value="Refresh Agreements" action="{!DummyFnction}" oncomplete="RefreshPrimaryTab('{!case.id}'); return true;" status="waitStatus" />
Please let us know if this will help u
All Answers
Please check below blog. I hope that will help you.
http://amitsalesforce.blogspot.in/2015/07/how-to-refresh-record-in-console.html
Include JS in VF page Then use below link to open new record . Write below Java Script code in VF page Please let us know if this will help you
Thanks
Amit Chaudhary
Thanks for the reply. But it executes the else part and says "Primary did not refresh".
Thanks
Thanks for your quick reply. I have added that. Still it says "Primary did not refresh".
Is it something to do with version of VF page? my VF page version is 34.
<apex:page standardController="Case">
<A HREF="#" onClick="testTabRefresh();return false"> Click here to refresh </A>
<apex:includeScript value="/support/console/26.0/integration.js"/>
<script type="text/javascript">
function testTabRefresh() {
sforce.console.getEnclosingTabId(showTabId);
}
var showTabId = function showTabId(result)
{
var tabId = result.id;
alert('Primary Tab IDs: primaryTabId ' + tabId );
sforce.console.refreshPrimaryTabById(tabId , true, refreshSuccess);
};
var refreshSuccess = function refreshSuccess(result)
{
if (result.success == true)
{
alert('Primary tab refreshed successfully');
}
else
{
alert('Primary did not refresh');
}
};
</script>
</apex:page>
Thanks
You can call the js code by Button so like below :-
<apex:commandButton value="Refresh Agreements" action="{!DummyFnction}" oncomplete="RefreshPrimaryTab('{!case.id}'); return true;" status="waitStatus" />
Please let us know if this will help u
Thanks a lot. It works :).
Is there a way to identify if a code is executed from console in Apex?
Thanks
Hi Amit,
Thanks a lot. It works :).
Is there a way to identify if a code is executed from Service console in Apex?
Thanks
Yes.. it works in VF.. I want to know if there is something available in Apex.
Thanks
I am also facing this issue, please help me too refresh primary tab.
Thanks