How to Delete Component from Managed Solution in Dynamics CRM 2016?

By | August 17, 2016

Introduction

How can we remove unwanted component from managed solution, which is installed at client environment? This question can strike you when there is a requirement to delete component, which you think is either no longer usable or should not be part of managed solution.

Suppose you provided your managed solution to client and there are some workflows that are not used any more. Now as a result you may want to delete it from client environment. If you have ever tried to delete components like; workflow, web resources, entities etc. from your managed solution, it might have occurred to you that it is difficult to delete components from managed solution.

You can refer this blog, which explains one way of how we can remove component from managed solution. The blog targets Microsoft Dynamics CRM 2011 and 2013. Now in Dynamics CRM 2016, we have better (OOB) way to accomplish this task.

In this blog, it is illustrated how one can remove component from managed solution using OOB solution functionality that was introduced in Dynamics CRM 2016. If you would like to know about the solution enhancement, you could refer these following blogs, Solution Management with Microsoft Dynamics CRM 2016 and Solution Patching in Microsoft Dynamics CRM 2016.

Walkthrough

1. We have created a solution named as “Base Solution 2” (version 1.0.0.0) in original organization which contains below three components,

  • Contact (entity)
  • Update Contact (workflow)
  • Send Email (workflow)Delete component from Managed Solution

2. Then import the managed version of this solution into target organisation.Delete component from Managed Solution 3. Remove unwanted workflow from “Base Solution 2” unmanaged solution. Here we have removed “Update Contact” workflow.

4. Clone “Base Solution 2”, changed version to 1.1.0.0.clone to solution

Select solution and click on “Clone Solution” button to clone selected solution. See below screen shot.clone solution5. Export this cloned solution as managed solution and import it on target organization where Base Solution 2 of version 1.0.0.0 is already installed with three components.

6. While importing this solution, make sure that you have checked “Stage for Upgrade”import actions Dynamics CRM

7. When solution import completes, you can see “Apply Solution Upgrade” option.

8. After applying solution upgrade, the two differences can be seen in already installed managed solution.

  • Version got changed to 1.1.0.0. And…
  • The workflow component got removed. You can see in below screen shot that “Update Contact’ workflow does not exist in managed solution.Base solution

Conclusion:

If you came across with the situation where you would require to remove components from Dynamics CRM managed solution, you can use OOB solution functionalities.

Cut short 90% of your manual work and repetitive data entry!

Get 1 Click apps and say goodbye to all repetitive data entry in CRM –
Click2Clone – Clone/Copy Dynamics 365 CRM records in 1 Click
Click2Export – Export Dynamics 365 CRM Report/CRM Views/Word/Excel template in 1 Click
Click2Undo – Undo & Restore Dynamics 365 CRM data in 1 Click

10 thoughts on “How to Delete Component from Managed Solution in Dynamics CRM 2016?

  1. Kumar

    Will those component be removed from the default solution also?

    1. inogic

      Yes, those components will be removed from the default solution also.

      Thanks!

  2. Serf

    What will happen with the values that were in Field 2?
    Will they just be deleted?

    1. inogic

      Hi,

      If you are applying solution upgrade and the field is already present on the form then it will give you an error and prevents the solution upgrade to the solution.

      When you open the log file it will show the detailed description of error while upgrading the solution.

      solution-upgrade

      If the field is not on the form then the field will be deleted from the CRM with the data in the field.

      Hope this helps.

      Thanks!

  3. Nisha Kumari

    I have a scenario where an alternate key has been created for Lead entity.
    But the problem is in both Dev and Prod this Key has became as managed .

    So I am unable to follow the given steps in Dev as in Dev also this Key is throwing an error while deletion.

    Please suggest.

    1. Inogic

      You cannot remove the managed components from default solution as CRM restricts it while deleting the managed components. You will not be able to delete the key as it is the part of managed solution on Production and Dev organization as well. In order to remove the components from managed solution you need unmanaged solution of this managed solution somewhere. Then you can remove it from unmanaged solution and export it as a managed solution and import into target organization by incrementing the version of the solution.

      Hope this helps.

      Thanks!

  4. Kai Hartmann

    Hello,

    we have the same problem with a relation we want to delete. Unfortunately this method doesn’t seem to work for us.

    1. Inogic

      Hi,

      Once the solution is imported, select the old solution and click on “Apply upgrade” button.

      Hope that helps!
      Thanks.

  5. Rahul Gupta

    Hi,
    What If I the unmanaged Base solution from source organization have been deleted. How can I delete components then from target organization?

    1. Inogic

      Hi ,

      Make sure to keep a backup of unmanaged solutions for future use, so in case you want to maintain the unmanaged solution in another environment, you can import the unmanaged solution from backup and then export the new managed solution. We cannot export Managed solutions from the Target environment.

      Thanks!

Comments are closed.