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 CRM (Archived)

Hiding fields across tabs in the same form.

(0) ShareShare
ReportReport
Posted on by 106

Complex-Business-Rule.pngWhat is the most efficient way to hide fields across tabs in the same form?

Business Rules Screen gets too complex as the number of fields increase.

Please help, thanks.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    MMK Profile Picture
    745 on at

    You can use javscript to hide fields

    by tab, by section or by individual field itself

    use true to show false to hide tab directly

     var tab = Xrm.Page.ui.tabs.get("tabname");

      tab.setVisible(false); // show/hide

    //for show hide fields in a tab

                   tab.sections.forEach(function (section, sectionIndex) {

                       

                   section.controls.forEach(function (control, controlIndex) {

                           try {

                               var attribute = control.getAttribute();

                               var attname = attribute.getName();

                             Xrm.Page.getAttribute(attname).setVisible(false);

                           } catch (e) {

                           }

                       });

                   });

  • Suggested answer
    TNS Profile Picture
    1,197 on at

    Hi Kashyap,

    If you have too many conditions then you can use javascript, to hide the fields.

  • Suggested answer
    Pawar Pravin  Profile Picture
    5,237 on at

    Hi KashyapT,

    It would be better to create js in case of multiple if conditions.

    Xrm.Page.ui.tabs.get("tabName").sections.forEach(function (section, sectionIndex) {

               section.controls.forEach(function (control, index) {

                   control.getAttribute().setVisible("true/false");

               });

    Please refer below url for reference:

    community.dynamics.com/.../retrieve-all-of-the-field-names-in-a-tab

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    2,545 on at

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 CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans