It's not a secret that there are two types of solutions exists in CRM: managed and unmanaged. Each has it's own properties and capabilities. In general solutions can be differentiated by next points
Managed solution | Unmanaged solution |
|
|
Storage model
Let's start from simple rule: each component in database can be presented with more than one line. This rule is valid for any type of solution any independently from component creation source.
(not)Published
Component in unmanaged solution can be in two stages published/not published. In database, in some moments, exists two variants of the same component, published (visible for user) and not published (visible for customizer). Unfortunately it's not possible undo all changes at this moment, but at least there is a base for this action.
Managed complexity
For components in managed solutions the same storage model is used, but in this case it's not temporal, until managed solution deleted from system. The same component will have one row for each managed solution. Final state of component will be determined by last installed solution, where this component present, in determination process used field Overwrite Time, row with default value (1900-01-01) will be used by system.
This separation in storage model, allows to remove managed solution with all its changes, one row is deleted and previous one becomes the main by defaulting of Overwrite Time field. This process becomes more complex for merged parts of system, like FormXML or SiteMap, but for this components the same storage model is used and additionally components of this types contains ...XMLManaged data in each row (obviously, except first one).
Mixed model
Of course in every system used both types of solutions at the same type (even if managed solutions are not used in development/deployment process, they are already in the system). All unmanaged changes (from UI or from solution import) will goes to one Active solution (if there was no changes before new row will be created), that's why changes or unmanaged solutions import will override component state totally. All managed changes will goes to specific for solution row in database and will not affect other solutions including Active solution (maintain import mode).
Import in override mode
It's common situation, when deployment of managed solutions in maintain mode doesn't bring changes to target system. This happens because component was changed in Active solution, new row for this solution was created and used by system as latest one. Import in override mode will also replace values in Active solution with values from imported solution, if appropriate record is exists. But such kind of import is not the best decision, because it can affect changes in other components (in mixed development/deployment model) and becomes a signal of deployment errors or external interference. Of course there is no other choice, when production organization corrupted. Unfortunately, changes from active solution can't be removed from the system in despite of the fact, that data model allows to do it in a simple way, but database changes is unsupported.
MS CRM in cloud (Office 365)
Moving MS CRM to the cloud doesn't changed the storage schema described above.But finally there was introduced a cleanup feature, that allows user to cleanup changes in the ActiveSolution for the particular element to the latest managed solution version. So from now on it's possible to revert changes done by the mistake on production and keep elements in a correct state.
I hope this description of storage meta-data in CRM will helps in understanding the nature of deviation of solutions, planing system architecture more effectively and avoid errors in development/deployment.
Comments
Post a Comment