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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s