Collapse/Expand tab
Xrm.Page.ui.tabs.get("<tabName>").setDisplayState("expanded"); Xrm.Page.ui.tabs.get("<tabName>").setDisplayState("collapsed");