Cannot Delete Component Error When Trying to Uninstall a Solution

Symptoms

Trying to uninstall a managed solution fails when an option set has a default value and the entity is used in a workflow from a different solution. 

For Example:
1. You create a workflow on Account and add Create Contact step to the workflow.
2. Then you package the workflow with a managed solution and import it to a target system. 
3. You create a custom option set attribute to the contact entity.
4. Then you package this with another solution and install it on to the same target system as the first solution.
5. On the target system open up the workflow editor and click on "Set Properties" button of the Create Contact step. 
5. Save and close both the step editor and workflow editor without changing anything. 
6. Try to uninstall the second solution which installed the option set attribute. 

You will see the following error message:
Cannot Delete Component
Cannot delete Solution because one ore more components require it.

Note: This issue happens even if you don't modify the workflow and properties at all. The issue is that you updated properties of the workflow by clicking save and close.

Cause

When an entity has an option set field, which has a default value specified, this default value information will be included once you save the workflow. It makes dependency inside the system on the solutions, which causes the uninstall issue for the solution.

Resolution

This is by design. The workaround for this issue is to remove the default value for the option set. After removing the default value, please re-update the Set Properties on the workflow step, then you should be able to uninstall the solution.

Note: If the managed solution is set to not allow customizations to it fields then the developer of the solution would need to update their unmanaged solution.
Rekvizīti

Raksta ID: 2501748. Pēdējo reizi pārskatīts: 2011. gada 26. janv.. Pārskatījums: 1

Atsauksmes