Friday 24 July 2015

Tab Events in CRM

Hi,

We got a requirement to do perform action on Tab expand and Collapse. To my goodness, CRM has provided Tab events. 

Here is the code which I have written.

function ShowTabStatus() {
    var currTabState = Xrm.Page.ui.tabs.get("tab_more").getDisplayState();
    if (currTabState == "expanded") {
        alert("Collapsing...");
    }
    else {
        alert("Expanding...");
    }
}

 


We can get the DisplayState and SetDisplayState of the tab too.

Here is the MSDN link for it.

Hope this helps.

--
Happy CRM'ing
Gopinath

No comments:

Post a Comment