I'm trying to follow this simple guide ( https://community.dynamics.com/crm/b/misscrm360exploration/archive/2015/06/29/tab-state-change-event-crm-javascript ), but i get the error
add_tabStateChange is not a function
Anyone was able to make this work?
My code:
test = function () { Xrm.Page.ui.tabs.forEach( function (tab, index) { Xrm.Page.ui.tabs.get(index).add_tabStateChange(function () { var currTabState = Xrm.Page.ui.tabs.get(index).getDisplayState(); if (currTabState == "expanded") { alert("Expanded"); } else { alert("Collapsed"); } }); } ); }
*This post is locked for comments