Making Managed fields required dynamically in Dynamics 365
On some instances, there are Managed fields in Dynamics 365 CRM (or CE if you want to call it) where we can’t change the required level of the field from Fields i.e. on the database level. And you get the below error –
Here’s an alternative way to do it.
Let’s consider this scenario.
- Although Microsoft suggests you don’t change the behavior of Managed fields since they are designed with a purpose. However, let’s consider this scenario where you want to make the Parent Account for Lead as required on the form.
When you try to change the Requirement Level as follows
- And while saving this change, you get this error.
So how do we do it? Let’s see.
Workaround – Business Rule
Now, to overcome this particular scenario you can implement a simple Business Rule to make it required as follows –
- If the field can’t be made Required on a database level, you can make it required on the form using Business Rule. Here’s how you create your Business Rule.
As the Business Rule starts with the condition, here’s the check you need to add in case the field value is not entered.
The condition I used is as below – Check if Parent Account for lead Does Not Contain Data
- If this is True, then go ahead and add a Step for True condition. Add Set Business Requirement Level
- And in this, you need to set the Business Required Status to Business Required as show below.
- And the result is the Business Rule which looks like in #1 above. Now, save your changes, Publish the Rule, Activate and check.
- The result will be that the field is not required once it doesn’t have data forcing the user to enter data for the same.
Hope this is helpful!