Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)
Suggested answer

How to load different forms based upon a field value, javascript?

Posted on by 880

Hi,

I have 300 fields in my current form, which is VERY SLOW. I read that something is optimized in CRM 2016. But I figure that the only way I can increase this, is by differentiate the fields, and place them on different form.

Ex.

100 fields are placed on form 1

100 fields are placed on form 2

100 fields are placed on form 3

Based upon a value in a field, ex. type = 1, form 1 should be loaded. Type = 2, form 2 should be loaded. Type = 3, form 3 should be loaded. If type is different from 1,2,3, form 4 should be loaded (A fallback with all 300 fields)

Can this be easily solved?

*This post is locked for comments

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: How to load different forms based upon a field value, javascript?

    Yes - this is the right idea.

    Different forms are good for role base views of the same data - so you might have different people who only need part of a record to do their job and so you would create a form just for thier role.

    Please mark this thread as answered to close it.

    Thanks

  • rskadk1 Profile Picture
    rskadk1 880 on at
    RE: How to load different forms based upon a field value, javascript?

    Allright, thanks for your answers. So basically what I may go for based upon your answers.

    - Set all sections not visible by defaults

    - Instead of javascript - make formrules that will display the fields required

    Will this give me anything? (Besides the form rules will be VERY LONG and a pain to setup)

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: How to load different forms based upon a field value, javascript?

    You can change forms using Javascript however I don't think this will solve your problem since the first form will have to full load and then the second will then be loaded - so infact it could actually make your load slower than simply having a single form and showing/hiding tabs/sections/fields dynamically. The important trick is to ensure that the fields/tabs have the 'visible by default' unchecked so that they are not initially visible and then show them using business rules/javascript.

    Perhaps another consideration would be to create child entities that you group related data together and then create a many-to-one relationship to that entity. You could use a 'quick view' form to show some data from that child entity on the parent record's form if needed - but not all otherwise you would be back to square one!

    Hope this helps,

    Scott

  • Suggested answer
    Sayhaitokumar Profile Picture
    Sayhaitokumar 7,042 on at
    RE: How to load different forms based upon a field value, javascript?

    Hi

    It would probably be easier to have a single form, and use java script to change the way it looks (hiding/showing/enabling/disabling certain fields). The control over which forms the user sees is based on security roles and how you define the hierarchy. Trying to get it to do something it wasn't designed to do, may be more pain than it is worth

    mscrmshop.blogspot.in/.../how-to-display-entity-form-based-on.html

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,056 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans