Forum Post: RE: tab hide-showwith javascript

Forum Post: Change the Filter On option on Opportunity Associated View for Account form

This JS will show/hide an element in D365 form that depends on the 2 field's value function HideOrShowSection(executionContext) { const formContext = executionContext.getFormContext(); let field_1_BB = formContext.getAttribute("field_1_BB").getValue(); let field_2_CC = formContext.getAttribute("field_2_CC").getValue(); if (field_1_BB === true && field_2_CC !== null) { formContext.ui.tabs.get("tab_name_AAA").setVisible(true); //Shows Tab } else { formContext.ui.tabs.get("tab_name_AAA").setVisible(false); //Hide Tab } } Check out Fredrik Engseth's blog for the complete steps on how to apply the JS into the form field –>

Source link

Leave a reply

Please enter your comment!
Please enter your name here