CRM 2015 – Workaround for bug: “managed solution cannot be deleted”

A while ago, I wrote an article about a managed solution that could not be uninstalled from CRM 2015 (both on-premise and online). When uninstalling the solution we received the error message “The SdkMessageProcessingStepImage() component cannot be deleted because it is referenced by 81 other components. For a list of referenced components, use the RetrieveDependenciesForDeleteRequest.”  (See “Developer 101: Help! My managed solution cannot be uninstalled…”).

We actually had two managed solutions deployed on the environment. Both solutions could not be deleted or updated.

Solutionerror

Searching the internet did not help us. We spent a couple of hours to get a grip on the error, but no success. We ended up with a reproducable situation and a lot of documentation. We decided to place a call at Microsoft Support.
We handed over the documentation, our backupped database and our managed solution to Microsoft.

A number of phone calls, email conversations and two support engineers later it looked like Microsoft isolated the problem and found out why we were not able to delete our solution.

CRM 2015 introduced the Enhanced Business Rules. Business Rules run at the server and that will fire no matter how records are updated and not only via the form (like in the previous versions of CRM). It turns out that the Enhanced Business Rules do their job too good.

In the case you define a business rule on an entity (not Form scope, but Entity scope) and within the business rule you e.g. lock a number of fields then you won’t be able to delete your managed solution. In case you set the scope of the business rule to a specific form, you can delete the solution without a glitch.

Workaround

For now the workaround is to do the following, in case you get an error when removing your managed solution:

  • check each entity, if there are business rules defined
  • if business rules have been defined: disable the business rules then delete the business rules (also the disabled ones)
  • repeat for each entity in your managed solution

In the meanwhile, we have to wait for a hotfix delivered by Microsoft. The reason why the other solution cannot be deleted is still under investigation.

One thought on “CRM 2015 – Workaround for bug: “managed solution cannot be deleted”

  1. […] of enhanced business rules the above solution no longer worked. After some research i found this link. Basically when you use Business Rules that run at Entity level with was no longer possible to […]

Leave a Reply

Your email address will not be published. Required fields are marked *