Thursday, September 16, 2021

Show or Hide Command Bar using JavaScript in DataVerse/ Dynamics 365

 

Introduction:

In this Blog we will see how to show or hide Command bar using JavaScript in Both Dataverse/Model Driven Apps/ CRM


Below is the Sample Screen Shot for Command bar



If we want to hide any button or edit command we can use RIBBON Workbench or Customize Using XML. But there is no other functionality for hiding whole Command Bar.

To recover from this Situation Microsoft introduced a new Feature for Show or Hide functionality


Script to Use:

formContext.ui.headerSection.setCommandBarVisible(BOOLEAN);


To Utilize in script

function showOrHideCommandBar(executionContext)

{

var formContext = executionContext.getFromContext();

formContext.ui.headerSection.setCommandBarVisible(false); // True to enable // False to hidden

}


That's it :)

No comments:

Post a Comment

How to disable Form JavaScript Using URL in Model Driven app and MSCRM

  Introduction : How to disable Form JavaScript Using URL in Model Driven app and MSCRM . Implementation Steps: Navigate to your Environment...