Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Different forms for an enitity based on initial field values selected

(0) ShareShare
ReportReport
Posted on by 1,135

Hi.

When creating a new Account record there are fields that are defined required like name and owner.

I would like to add a relationship type field and make it a required field. Based on the value that the user selects for the relationship type field a dedicated form will be opened for the user for further details of the record. Based on the relationship type there are different fields and information the user needs to collect from the record so this feature would be handy.

Is this possible to create somehow?

*This post is locked for comments

  • Verified answer
    Royal King Profile Picture
    27,686 on at
    RE: Different forms for an enitity based on initial field values selected

    Other option is creating unique Roles for each  form and assign that role to appropriate people. Once you done with above steps enable security role on the form that will take care of showing right for to user.

    You can find more information on this here

    www.powerobjects.com/.../pros-cons-role-based-forms-crm-2011

    crmadminassist.com/dynamics-crm-2013-security-roles

  • jp12345678 Profile Picture
    1,135 on at
    RE: Different forms for an enitity based on initial field values selected

    Is there a way to accomplish this with point and click customization?

    I am not familiar with scripts.

  • Verified answer
    Royal King Profile Picture
    27,686 on at
    RE: Different forms for an enitity based on initial field values selected

    Yes you can load different forms based field value but it will work only for existing record not for new record as there won't be any value set on the new record until user saves.

    Here is the script that loads the different form based on field value.

    function changeForm() {

       var relType = Xrm.Page.getAttribute("fieldname").getValue();

       if (Xrm.Page.ui.getFormType() != 1 && relType) {

           var lblForm;

           switch (relType) {

               case 100000000:

                   lblForm = "Transaction"; //FormName

                   break;

              case 100000001:

                   lblForm = "Transaction1"; //FormName

                   break;

               default:

                   break;

           }            

           if (Xrm.Page.ui.formSelector.getCurrentItem().getLabel() != lblForm) {

               var items = Xrm.Page.ui.formSelector.items.get();

               for (var i in items) {

                   var item = items[i];

                   var itemId = item.getId();

                   var itemLabel = item.getLabel();

                   if (itemLabel == lblForm) {

                       item.navigate();

                   }

               }

           }

       }

    }

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans