web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Dynamically show/hide Tabs on form based on field value without JavaScript - Using standard features and functions in D365?

(0) ShareShare
ReportReport
Posted on by 135

Is it possible to show and hide Tabs on a form based on field value without the use of JavaScript?

Lets say we hava form with 3 tabs: General, Info, Other. (Each tab has many fields and sections)

On General tab we have a field for "Show Info Tab" with Yes/No options.

If Yes the tab "Info" is visible 

If No the tab "Info" is hidden completely. Not just fields and sections but also the tab name on top of the form.

I know this is possible using JavaScript, but now late in 2020 - is there any new method one could use with standard features or functions in Dynamics 365

I have the same question (0)
  • Suggested answer
    Ran Zhang Profile Picture
    on at

    Hi,

    I don't think we have standard feature supporting hiding tabs based on field value. I thought about Business Rules, Workflows, etc, but neither of them has this functionality. Please check the official doc https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/visibility-options-legacy. By the way, it's very easy to use JS to achieve your requirement, please reconsider the operation. Thanks.

  • TGT Profile Picture
    135 on at

    Yeah, that's what i already figured out. Was worth a shot anyway.

    Solved using a small JavaScript something like this:

    function showHideTabs(executionContext) {
    	var formContext = executionContext.getFormContext();
    	var xxxfieldNamexxx = formContext.data.entity.attributes
    		.getByName("FIELDNAME")
    		.getValue();
    		
    	if (xxxfieldNamexxx) //true
    	{
    		formContext.ui.tabs.get("TAB NAME").setVisible(true);
    	} else(!xxxfieldNamexxx); //false
    	{
    		formContext.ui.tabs.get("TAB NAME").setVisible(false);
    	}
    }

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 45 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 36

#3
Satyam Prakash Profile Picture

Satyam Prakash 31

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans