Check Dependencies when deleting Fields in Dynamics CRM 2011

Zhen Yuwang, 25 March 2012

Sometimes after you create a field and set up everything, you may found there is a tiny mistake such as spelling in its name. Or you could have a request to remove an out-of-date field from current form. In both situations, you need to delete a field in Dynamics CRM 2011.

Then the problem is not as simple as you thought, delete that field directly in Customizations. This kind of operation definitely leads an error like this.

 Check Dependencies when deleting Fields in Dynamics CRM 2011

So what should you do before deleting?  Answer is checking Dependencies of the field. Select the field you want to delete, click “More Actions” -> “Show Dependencies”. There is a new window pop up and give you all details of dependencies you show remove first before deleting.

 Check Dependencies when deleting Fields in Dynamics CRM 2011

Check Dependencies when deleting Fields in Dynamics CRM 2011

First of all, remove that field from form editor. If its “Requirement Level” is “Business Required”, change it to “No Constraint”, then remove.

 Check Dependencies when deleting Fields in Dynamics CRM 2011

Next is removing this field’s columns from all existing views. Don’t forget to remove the find column in “Quick Find View”.

 Check Dependencies when deleting Fields in Dynamics CRM 2011

Check Dependencies when deleting Fields in Dynamics CRM 2011

 

The third part is Charts. Don’t use this field in charts’ “Series” or “Category”.

After all those above have been done, you still need to check any plugin steps running on this field. Deselect it in “Filtering Attributes” by updating the step in Plugin Registration Tool. That tool you can find it under “\sdk\tools\pluginregistration”.

 Check Dependencies when deleting Fields in Dynamics CRM 2011 

Last but not the least, you need to check is there any JavaScript related to that field. If it is, update the JavaScript. Otherwise, there will be an error when JavaScript runs.

Finally, check the dependencies of this field, it is empty. Now we can delete that field safely without any error.

 Check Dependencies when deleting Fields in Dynamics CRM 2011