web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Form selection

(0) ShareShare
ReportReport
Posted on by

Hi

I have 2 main forms in an entity. Each form contains different fields.

How can I customize the entity to select the form based on the fields that it contains.

For example if field b in Form B contains data then go and select form B rather than Form A.

Thank you

E

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at
    RE: Form selection

    Hi Elsa

    You really need two forms?

    Because otherwise you just need to create 1 form with show hide the tab or section

    If you need two forms you can refer here:

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

    ashwaniashwin.wordpress.com/.../navigating-to-multiple-forms-dynamically-using-jscript-in-crm-2011

    Hope this helps.

    Thanks

  • Verified answer
    Neil Parkhurst Profile Picture
    10,727 User Group Leader on at
    RE: Form selection

    You can swap the form using javascript. This link is to a blog post I wrote on this subject;

    neilparkhurst.com/.../javascript-form-navigate

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Form selection

    you can add the field B into Form B and Form A (you can hide it in form A)

    then in OnLoad event you can check if the field B contains data so select the right Form using the navigate method :

    Xrm.Page.ui.formSelector.items("id").navigate();

    Hope this help!

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: Form selection

    Hi Elsa,

    You can programmatically change the form that your user is using by using some javascript.  Create a function and attach it to a fields on change event to fire.  You can also fire the function on load if a certain field contains data, ie if field B is not null.

    Check this link, it should guide you in the right direction:

    stackoverflow.com/.../how-to-change-default-form-based-on-dropdown-js-and-crm

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans