Hi,When i set a field as mandatory by code, the red star appears but it still allows me to save without it being filled
if(//) { Field1.mandatory(true); } else { Field1.mandatory(false); }
Are you this on a table extension or your custom table ?
Share the actual code with us.
Hi Komi,
This is on a form and field1 is a control with lookup but it's not bound to any datasource
Hi, I think unbound fields cannot be changed to mandatory. Even though it will show red line and feels it is mandatory but it's not.
There is a feature to make field required by personalization but won't recommend if required for all users as user can disable it and moreover personalizationn has to be used by all users.
dynamicspedia.com/.../
Hello Junior AX,
Just like Mohit said, I doubt you will get the result using .mandatory.
You check if the field is empty and throw an error yourself.
Check this.
community.dynamics.com/.../want-to-mandatory-display-unbound-field
Hi junior AX,
A small addition to the comments above. Mohit shared my blog. Also, the option described in this blog is not working for unbound controls.
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.
Martin Dráb 683 Most Valuable Professional
André Arnaud de Cal... 563 Super User 2025 Season 2
Sohaib Cheema 398 User Group Leader