One of the challenges that I faced over time with both CRM 4.0 as well as CRM 2011, is eliminating "bit" or "two option" attributes from an entity in CRM once there are workflows in place that create records for that entity. If you try to get rid of one of these fields, and if you have any workflows that create records of the entity that it exists in, you’ll have problems removing it from the entity. One of my friends at MTC figured out how to do this so I thought I’d show you.
Consider the following situation:
- You have added a custom "two option field" to the task entity.
- There are lots of workflows that create tasks in your CRM organization
- You’re now trying to remove the above "two option field"
- you have already eliminated the field from all forms and views
- CRM won’t let you delete it because it is used in workflows
The problem is that CRM assumes that every workflow the creates a record is attempting to set the value of the two option field, which means it’s in use and CRM won’t let you eliminate the field from the entity.
In order to delete this attribute from the entity, you will need to update every workflow that creates a record of that entity and modify the entity record create line in each workflow so that it doesn’t actually update the field you’re attempting to delete. This is easier said than done, but I’ll show you how a moment.
In this example, there is a custom "two option field" by the name of "isbillable" in the task entity. We are eliminating the need for this field and trying to clean up our entity, so we need to delete "isbillable". Unfortunately we have a workflow that is preventing us from doing that, shown here.
The problem is that create task line, shown in detail below:
It seems that no matter what you do, you cannot clear the Yes or No value because it only supports two option and there is no option to clear it.
Here’s the trick:
- Make sure the former system is displayed, then click on the is billable field on the form.
- Use the form assistant to insert any dynamic field into the “is billable” field on the form as shown here.
- Now click on the yellow dynamic field that has been inserted into the is billable field and delete it.
- You will now be left with a "two option field" that has no value specified.
- Save and close the create form, activate the workflow, and repeat for each workflow that create records of entity. You should now be able to delete the attribute.
I hope this trick save you some time!
Steve Noe, CRM MCT