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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Required Fields On Different Forms

(0) ShareShare
ReportReport
Posted on by 175

I have some fields that I want required on specific forms, but not required on all. Is there a way to make a field required only on a specific form?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Genya Profile Picture
    175 on at

    Can you explain more?

    Is it different forms for the same entity or different entities and you want to change field requirements?

  • Suggested answer
    Royal King Profile Picture
    27,686 on at

    you could use script to set required fields based on the form name

    var item = Xrm.Page.ui.formSelector.getCurrentItem();
    Form= item.getLabel();

     if (Form== "Your Value") {

               Xrm.Page.getAttribute("new_fieldy").setRequiredLevel("none");

           } else if(Form== "XYZ") {

               Xrm.Page.getAttribute("new_fieldy").setRequiredLevel("required");

           }

  • Matt_Healey Profile Picture
    175 on at

    Same entity, but lets say on a specific form their address is required, but wouldn't be necessary on another form for the same entity.

  • Suggested answer
    Jmiquel Profile Picture
    560 on at

    Hello,

    If you create multiple forms for the same entity, you can choose the required fields exept for the "main" field of the entity (In general "name")

  • Matt_Healey Profile Picture
    175 on at

    I'm also using ADX Studio Portals. I'm trying to be able to have the my page dynamically bring in forms without having to do too much customization on the page itself. Otherwise, I may just end up building custom forms within the page itself.

  • Matt_Healey Profile Picture
    175 on at

    Where would I set the fields to be required? I don't see a way in the form builder to set a field as required and if I set them within the entity are they not required on all forms?

  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi Matt,

    The field required or field requirement setting is in the Field setting of the Entity.

    It is not in the Form Setting, different from Visibility setting, you have check mark to Visible by Default, or Field is read only or not.

    The requirement level is stored in the field setting metadata, not in the Form.

    So, yes, if you want to make the required level different by specific form, then you need specific rules, for example using JavaScript or for CRM 2013 you can use Business Rules for the new refreshed UI Form entity.

    Please be aware that Business Rules is up to Form Level setting, and you can set the Requirement level as well.

    Adxmetadata2.png

    I understand that you just want to deploy the EntityForm to the ADX Portal.

    And as I know the JavaScript from CRM Form will not be transferred not be executed in the ADX Portal Form, you should write your own custom javascript.

    I am not sure whether Business Rules will be available in ADXPortal next release or not, according to this link:

    https://community.adxstudio.com/forums/adxstudio-portals/bea97fe0-d193-e311-aafa-00155d47372f

    Last time it was not available.

    But, as I know ADX Studio Portal Entity Form has flexible setting for the Field requirement metadata:

    So, my suggestion is in the CRM Form you use JavaScript or Business Rules to make it required, in the Adx Entity Form, you set required field, this is based on the Form Level. Adx Portal created some great features for more flexibility setting.

    Hope it helps!

  • Suggested answer
    Aileen Gusni Profile Picture
    44,524 on at

    Adx Studio has their own form Builder to set the Field requirement.

    See my previous answer, Matt.

    Thanks.

  • Matt_Healey Profile Picture
    175 on at

    Thank you for your detailed and helpful response!

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans