A sample function on how you can show and hide a tab based on a Yes/No field in Dynamics 365. To use the script create a new script or add the function to an already existing web resource and add it to the forms on load event and the on change event on the field.
function HideOrShowSection(executionContext) {
const formContext = executionContext.getFormContext();
let displaySection = formContext.getAttribute("fe_displaysection").getValue();
if (displaySection == true) {
formContext.ui.tabs.get("fe_hide_show_tab").setVisible(true);
} else {
formContext.ui.tabs.get("fe_hide_show_tab").setVisible(false);
}
}
Add an on change event on a Yes/No and on form load to hide or show based on the value in the field when the row is loaded. Example on how it looks to add to the different events in Power Platform admin center.
The on change event
Image of how to add on change on a field on the contact form.
The on load event
Image of how to add form on load on the contact form.
How it looks like when the Display Section is Yes the tab is visible.
Image of when the tab is visible
And how it looks when the Display Section is No the tab is hidden.
How I use Claude’s Excel add-in together with Easy Translator from XrmToolBox to translate and clean up Dynamics 365 labels. From export to import in minutes instead of hours.
I needed to set up an environment settings file for a Power Platform pipeline the other day. The file tells Azure DevOps which connections to use when deploying a solution — and to fill it in, you need the connection ID for each connection reference. The standard approach is to go into make.powerapps.com, click Connections …
I needed to update a couple of Power Automate flows the other day. Then it hit me: the Power Automate Tools browser extension copies flows as JSON — and JSON is something Claude handles really well. So I tried it. Copied the flow JSON, pasted it into Claude inside my Dynamics 365 Architect project, described …