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

Announcements

News and Announcements icon
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

I have the same question (0)
  • Verified answer
    Royal King Profile Picture
    27,686 on at

    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();

                   }

               }

           }

       }

    }

  • jp12345678 Profile Picture
    1,135 on at

    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

    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

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans