Notifications
Announcements
No record found.
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
Can you explain more?
Is it different forms for the same entity or different entities and you want to change field requirements?
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");
}
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.
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")
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.
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?
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.
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!
Adx Studio has their own form Builder to set the Field requirement.
See my previous answer, Matt.
Thanks.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2