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

-1
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.            
asked
2 answers
2

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.

 

UPDATE:

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 li.mx-navbar-item a").filter(function(node) {
		return node.text === " Locations"
		}).attr("data-item-id")[0];
		//set it
		if (targetID) {
			m._view.deselectAll();
			m._initialSelection = targetID;
			m._currentSelection = targetID;
			m._view.select(targetID);
		}
    } else {
        setTimeout(window.setMenu, 250);
    }
};

window.setMenu();

 

answered
1

Hi venkat,

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

answered