You need to sign in to do that
Don't have an account?
PipeCove
focusPrimaryTabByName not working in Service Cloud Console...?
Hi,
I cannot get this function to work on my Visualforce page, nothing happens when I press the button that calls this method.
I have extracted the code just for this function:
<script type="text/javascript"> function openGroupView() { sforce.console.openPrimaryTab(null, '/apex/Group', true, 'Groups', null, 'GroupTab'); } function focusGroupView() { sforce.console.focusPrimaryTabByName('GroupTab'); } </script>
Here is the (extracted) code for the buttons:
<apex:form> <apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:commandButton id="groupButton" onclick="openGroupView();" value="Open GroupView"/>
</apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:commandButton id="groupButtonFocus" onclick="focusGroupView();" value="Focus GroupView"/> </apex:pageBlockSectionItem> </apex:pageBlockSection> </apex:form>
The 'groupButton' works fine, but the 'groupButtonFocus' do not work.
Do anyone know if this is an issue within Salesforce or the Service Cloud Console? Just for the record, I haven't tried this on anything else than the Service Cloud Console, since that's what we are currently working on.
just to cross check
change your function like below and see
function focusGroupView() {
sforce.console.focusPrimaryTabByName('GroupTab',focusSuccess);
}
var focusSuccess = function focusSuccess(result) {
//Report whether going to the primary tab was successful
if (result.success == true) {
alert('Going to the primary tab was successful');
} else {
alert('Going to the Primary tab was not successful');
}
};
When using your callback function I do not get any of the two alert boxes, although I can see that the JavaScript function is called (added a log message in the console).
what is the API verion script that u r using ? like highleted below
<apex:includeScript value="/support/console/22.0/integration.js"/>
We are using API version 26.0
<apex:includeScript value="/support/console/26.0/integration.js"/>
Did you find a solution for this?