Does anyone have experience with the Salesforce Console Integration Toolkit, specifically the focusSidebarComponent() function. I have a few different VF pages displayed in the sidebar (CustomerKb (id="CustKbVF" name="CustKbVF"), Announcements) and I want to set up a JS onclick to focus CustomerKb from the Announcements tab. Any suggestions on what I'm doing wrong?
<script type="text/javascript">
function focusCustKb() {
sforce.console.focusSidebarComponent(JSON.stringify({componentType:'VISUALFORCE',
pageName: 'CustKbVF'}), "CustKbVF", focusSuccess);
}
var focusSuccess = function focusSuccess(result) {
//Report whether going to the tab was successful
if (result.success == true) {
alert('Going to the tab was successful');
} else {
alert('Going to the tab was not successful');
}
};
</script>
<A HREF="#" onClick="focusCustKb();return false">
Click here to focus Customer Kb</A>
CustKbVF
, that's likely your issue. I don't see how to get the correct value though. Hmm...