In this article , I am going to explain how to expand and collapse tabs Expand tab Xrm.Page.ui.tabs.get("name").setDisplayState('expanded'); Collapse tab Xrm.Page.ui.tabs.get("name").setDisplayState('collapsed'); Expand / Collapse tab using javascript in CRM 2016