Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

change form layout automatically

Posted on by 385

Hi,

let's say I created several case form layouts, each layout for each subject. I'm looking for some way to change the form layout automatically depends on certain conditions. In this example subject field equal to subject-1 I will see layout-1 if subject field equal to subject-2 to I will see that layout-2. 

Thank :) 

  • Suggested answer
    Donna Edwards Profile Picture
    Donna Edwards 2,996 on at
    RE: change form layout automatically

    A few thoughts for consideration:

    When you create the various layouts, try to do it at the section and tab level rather than field and use JS to manage it.  

    Managing changes at the field level can add a layer of complexity if there are several fields.  

    If only a couple of fields change then Business Rules should work fine for you.

    If there are more than three fields that need to hide / display then managing this level of logic with Business Rules, is going to be challenging.  

    Although I prefer to minimize the use of JS as well, when it comes to hiding showing fields, sections, tabs.... JS is a better option.

    Here are a few links to help you understand options and make a decision that fits your organizaation's needs

    docs.microsoft.com/.../create-business-rules-recommendations-apply-logic-form

    www.itaintboring.com/.../how-to-lock-and-hide-controlssectionstabs-in-a-more-structured-way

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: change form layout automatically

    I am a rather new CRM developer, but my organization wants to restrict the amount of scripting we use.  To that end we try to accomplish as much as we can with OOB functionality.  If you are asking about switching a Form on the same Entity, based on a selection made in Field 1, have you tried using Business Rules?  For instance, if Field One = A, Show Fields 2, 3, 6, 9; if Field One = B, Show Fields 1, 2, 3, 5, 7, 8, 9,10. etc.  This works in our organization.  the only downside is that the layout takes a bit of tweaking because of the "spaces" saved/removed for the various fields.

  • Prashant_ Profile Picture
    Prashant_ 1,040 on at
    RE: change form layout automatically

    Hi Alexyou,

    Can you share more detail related to your form layouts? if you are looking to change form based on optionset please look into this blog  mscrmshop.blogspot.com/.../how-to-display-entity-form-based-on.html

    you might get idea how to change entity form using JS.  

  • Prashant_ Profile Picture
    Prashant_ 1,040 on at
    RE: change form layout automatically

    Hi Alexyou,

    Can you share more detail related to your form layouts? if you are looking to change form based on optionset please llok into this  mscrmshop.blogspot.com/.../how-to-display-entity-form-based-on.html

    blog you might get idea how to change entity form using JS.  

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans