In this blog, we will understand how to show/hide tab using JavaScript in D365 CE(CRM).
Syntax:
formContext.ui.tabs.get(tabName).setVisible(bool);
PARAMETER:

Code
var formCustomizations = {
hideChecklistTab: function (executionContext) {
let formContext = executionContext.getFormContext();
let checklistValue = formContext.getAttribute("crff1_showchecklist").getValue();
if (checklistValue != null && checklistValue == 267460000) {
//show the tab
formContext.ui.tabs.get("tab_2").setVisible(true);
}
else
{
//hide the tab
formContext.ui.tabs.get("tab_2").setVisible(false);
}
}
}
NOTE:
To get the tab name click on the tab and check the properties section

Result:

