UnManaged Solution
When you import a unmanaged solution all the changes are really changing the default solution, all your changes are copied to the default solution. Then if you delete the unmanaged solution later the
changes will remain.
- In unmanaged solutions we can create components and customise
- Unmanaged solutions usually used to export customisations across other organisations.
- Unmanaged solution can be deleted however components created in it will not be deleted and will stay as a part of Default solution. If you want to delete we have to do it manually in the default solution
- UnManaged solution can be overridden by another new version of Unmanaged solution.
Managed Solution
A managed solution is a completed solution in which the solution is prevented from being modified in the environment to which it is imported. A managed solution is intended to be distributed and installed.
- Managed we can restrict things with the help of "managed properties"
- Managed solution cannot export
- Managed solution by deleting it will delete all its components unless referenced from a different solution.
- Managed solution can be overridden by another new version of managed solution.
ISV
They are used by the Independent Software Vendors (ISV's) who sell a set of IP that is not expected to be changed or modified by the customer purchasing these solutions. They are positioned to be updated or upgraded only by the ISV that sells them.
Is it possible to edit managed solution
Default Behaviour
When you open the CRM default solution and by default it is not possible to edit the existing field or form of the managed solution but we can edit webresource by default.
But we can add new field or add new webresource in the form of the existing entity.
Over-ride the default behaviour
We can over-ride the default behaviour of the editing managed solution in the CRM default solution.Give restriction with the help of "Managed Properties"
How to Roll-back solution to a previous customization state in CRM
It is possible only when you are importing solution in managed mode( not in unmanaged mode).
Managed solutions is able to create layers of customizations. In the unmanaged model, all customizations are at the same layer, so making any customization will overwrite what is currently in the system.
However, managed solutions have the capability to keep track of which customizations belong to which solution. To the end user, only the top layer (latest solution installed) is visible, but under that layer there can be multiple layers of customizations so you can build a solution on top of another solution without mixing up all the changes. You can think of this capability as using reference assemblies in .net. You can develop a solution by referencing an existing managed solution.
The end result is that you will have two solutions (one depends on another) but there can be a clear distinction of which customizations belong to which solution. Solution layering also means that you can revert-back to a previous system state. If you uninstall a solution, all its components will be removed but the customizations from other solutions in a lower layer will surface back.
Example:
Scenario 1:
Import a single managed solution in PROD environment and delete that solution How CRM will work
Step:1 In DEV environment, create a unmanaged solution as KTI_A and create a new entity as "TestSoln" and export that solution as Managed solution and import to PROD environment as KTI_A.
Step:2 After importing managed solution in PROD environment, new entity "TestSoln" is created.
Step:3 When you delete the KTI_B solution in PROD environment.
Result
Now you will see "TestSoln" created entity is deleted in PROD environment.
Scenario2:
Import a two managed solution in PROD environment and delete the latest solution let see How CRM will work
Step:1 In DEV environment, create a unmanaged solution as KTI_A and we have an entity as "TestSoln" and export as Managed solution and import to PROD environment as KTI_A.
Step:2 In PROD environment, new entity "TestSoln" is created.
Step:3 In DEV environment, create a another unmanaged solution as KTI_B and Add new field as "new_karyatestfield001" in "TestSoln" entity and export as Managed solution and import to PROD environment as KTI_B.
Step:4 In PROD environment, now you can see that entity with that field created. Internally KTI_B solution is sit on top of the KTI_A managed solution.
Step:5 When you delete the KTI_B solution in PROD environment.
Result
Now you can see only new created field "new_karyatestfield001" is deleted. Entity "TestSoln" is still maintained in the PROD environment.
Because KTI_B is sit on top of the KTI_A managed solution.
- KTI_A solution has new entity created.
- KTI_B solution has new field created "new_karyatestfield001".
When delete KTI_B solution, KTI_A solution changes is persist and KTI_B solution changes is removed.
When you compare scenario1 and scenario2, usually when you delete the managed solution corresponding entity also hard deleted. But when entity is refered as more than one managed solution. If you delete the one managed solution, old or latest one solution change persist.