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
ArmouryArmoury 

Custom Console Component - Focusing tabs

Hi,

We have a service console app enabled and on the right side bar there are two 'Custom Console Components' which is mapped to two different VF pages. 
Now on my left console screen lets say I have a field and based on the value provided in this field - i have to switch the focus between the two VF pages on my right side bar.
For Ex., 
On my left screen lets say i have a text field called 'Page Name'. On my right side bar I have two tabs with 'VF-1' and 'VF-2' as the custom console components.
So if i enter the text as 'VF-1' in Page Name field on the left screen, the focus of the tab on the right side console component should be 'VF-1' and it should display the contents of the corresponding page. Similary for 'VF-2'..
I checked the console toolkit integration methods but there is nothing relevant to this. Can anyone help me on this feasability of this requirement.?
Thanks.
Best Answer chosen by Armoury
ArmouryArmoury
Hi pcon,

Those are used to refresh the tabs on the main console screen and not for the custom console component.
I managed to implement this by using 'focusSidebarComponent' method in the toolkit.

This is what I used
 
sforce.console.focusSidebarComponent(JSON.stringify({componentType: 'VISUALFORCE', pageName: 'VF-1'}),"", callback)

 

All Answers

pconpcon
Does using the focusPrimaryTabByName/focusPrimaryTabById [1] or any of the other focus* methods not work for you?

[1] https://developer.salesforce.com/docs/atlas.en-us.api_console.meta/api_console/sforce_api_console_focusprimarytabbyname.htm
ArmouryArmoury
Hi pcon,

Those are used to refresh the tabs on the main console screen and not for the custom console component.
I managed to implement this by using 'focusSidebarComponent' method in the toolkit.

This is what I used
 
sforce.console.focusSidebarComponent(JSON.stringify({componentType: 'VISUALFORCE', pageName: 'VF-1'}),"", callback)

 
This was selected as the best answer