Show/Hide - field/section/tab on entity form

 

In Dynamics 365, You can show/hide fields or tabs or sections based on your business logic.

Syntax for field: 

formContext.getControl("firstname").setVisible(false);  //Hide field firstname

formContext.getControl("firstname").setVisible(true); //Show field firstname


syntax for tab: 

formContext.ui.tabs.get("Tab_name").setVisible(true);  //Show tab on form

formContext.ui.tabs.get("Tab_name").setVisible(false); //hide tab on form


Syntax for section: 

formContext.ui.tabs.get("Tab_name").sections.get("section_name").setVisible(true);


Comments

Popular posts from this blog

Accessing Fields on QuickView Form through javaScript

ADF - (Part 2) Integrate Data From CRM to External system

ADF - (Part3) Integrate Data From CRM to External system Using Stored procedure