How to change the Focus of a tab to another tab in Menu bar?

Hi, In my application I am having tabs like Home, Administration, Leads, Accounts and Contacts. Here, I have one Microflow to convert lead. In this microflow, I am creating an account and contact while converting a lead. and Opening the Accounts page. The focus of Leads tab is still focusing the Leads tab after the conversion and account page opening also. Now I want to change the focus of Leads tab to Accounts tab when the accounts page is opened. Below are the screen shots of my issue. Please provide me some solution for this. Thanks, Venkat.            
2 answers

Venkat, you asked the same question earlier this week and I provided a solution. Why are you asking again?


In that thread, I gave you options and included a previous question in the forum where I'd provided a custom JavaScript solution.



Here's a code snippet that works with the top menu bar. This code is looking for a menu item called "Locations" and setting that as the active tab. Note the space before Locations in the code, that's necessary:

window.setMenu = function() {
    if (dojo.query(".mx-navbar")[0]) {
		//get the navbar
		var m = dijit.registry.byNode(dojo.query(".mx-navbar")[0])
		//get the target ID
		var targetID = dojo.query(".nav a").filter(function(node) {
		return node.text === " Locations"
		//set it
		if (targetID) {
			m._initialSelection = targetID;
			m._currentSelection = targetID;;
    } else {
        setTimeout(window.setMenu, 250);




Hi venkat,

Could the tabswitcher widget from the appstore be an option for you?