Difference between Managed and UnManaged Solution in CRM 5.0 (2011)? - dynamics-crm

I am wondering what is the Difference between Managed Solution and UnManaged Solution in CRM 5.0 (2011)?

Unmanaged solution: Essentially the same as 4.0. As soon as someone imports an unmanaged solution into an organization, it becomes an integrated part of the organization and can only be removed by manually removing all parts of the solution. The components of it can be freely edited, changed, and removed.
Managed solution: Managed solutions can be locked down by the creators to not allow or allow editing of forms, adding new forms, changing display names, etc. A managed solution can be easily removed by just deleting the solution, and all components (that aren't needed for another solution) will be removed.

Unmanned Solution**:That solution we are edit update Unmanaged solutions are groups of unmanaged customizations. Any unmanaged customized solution component can be associated with any number of unmanaged solutions.
You create a managed solution by exporting an unmanaged solution and selecting to package it as a managed solution.
Manged Solutions:A managed solution is a completed solution that is intended to be distributed and installed.we cant modify and customizations that solutions.

Also,
an UnManaged solution has no restrictions on what can be customized, and when you make changes to the system through an UnManaged solution the changes remain behind.
Managed solution all customizations are lost when it is deleted. So there is the potential for data loss in that event.

Related

Recovering from a lost unmanaged solution in Dynamics CRM 365

I am in the unfortunate situation of having lost the unmanaged solution for our production environment in Dynamics 365. What I do have is an export of the managed solution that I am able to inspect.
I had tried to manually modify the managed solution to be unmanaged by updating <Managed>1</Managed> to 0. However when importing this modified solution into the same environment, the import failed with the message
"unmanaged solution expects full formXml" (error code 0x8004023B)
It's worth noting that I was attempting to import the modified unmanaged solution into an environment where the managed equivalent was already installed and in-use. I am not sure if importing this manually unmanaged solution into a fresh environment would be successful.
Questions:
What are my options in recovering an unmanaged and editable solution from this exported managed solution?
If an unmanaged solution is able to be recovered and installed in Sandbox, will there by any issues in updating the managed solution in
Production?
Is it possibly to simply add on a new solution, dependent on the base managed solution, that would allow me to modify the base
solution? I am pretty sure I can add features to the base solution but
would not be able to change or remove any features of the base
solution.
Would importing this modified unmanaged solution into a fresh environment have a better chance of importing without error?
you might want to check out thi article on how to manipulate solutions via SDK. https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/sample-work-solutions
You shuld be able to re-create the unmanage solution though this.
Use Solution Packager
(https://learn.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/compress-extract-solution-file-solutionpackager)
to extract your solution as managed.
In extracted folder in file Other\Solution.xml change Managed to 0.
Use Solution Packager to pack your solution as unmanaged
(/packagetype:Unmanaged) Import it into development organization.
Verify that all your customizations are there and valid.
No guarantees but it should work. You might loose some managed changes for forms and sitemaps. Most probably you aren't using them.
Also please do organization backups before importing solutions into your organizations. Just in case something won't go as expected.

Is it possible to add process for custom entities in managed solution in Dynamics crm?

I have a managed solution where I want to add a process/workflow with custom entities. I am able to add process in unmanaged solution for custom entities but have any way to do in managed solution or any alternative way to do so?
Please suggest me what I can do.
Managed solution is not recommended for regular development lifecycle projects, as the future schema changes will be challenging. Managed solutions are good for redistributable components like CRM REST Builder, where author want to have full control & customizations are not allowed in those components as that may break future upgrades of that particular managed solution.
Still you can go ahead & create a standalone solution with your custom entities, then add a WF for that entity. Finally you can export as managed solution to import in other environments (usually only Prod). This way you can customize anytime in lower region like Dev/QA, but Prod can have managed solution & if anything goes wrong - deleting managed solution in Prod will wipe out components + data. You can change in Dev again & a fresh exported Managed solution can be imported in Prod.
Managed solution components cannot be directly customized.

Manual Plugin Registration - Managed Solution

I have some questions regarding the registering/updating of 3rd party plugins that were previously loaded via a managed solution by a 3rd party.
The issue we are having is that they(3rd party) sent us a plugin update and a new plugin outside of the Managed Solution and had us register it manually though the registration tool. Then, next time we tried to import a later version of their solution, the Managed solution import failed. We eventually realized that there where duplicate rows in the pluginassembly and pluginassemblytype table that had the same Pluginassemblyid and plugintypeid respectively with different solutionids.
These solutionids were "Active" which I assume came from the manual registration and "IPM Global" which is our 3rd Party Managed Solution. The only way we were successful in getting the solution to import was to change the overwrite time
on the table(s) to 0 and then delete the "Active" pluginassembly and plugintype records.
Is there any other way to accomplish this same thing that is supported?
BTW. We did try to unregister the plugins before trying this, but there were too many dependencies in our workflows.
Wow, this is a thorny problem. Since you mention updating the tables directly, I'll assume that the system is on-prem.
Registering a plugin that exists in a managed solution outside of that managed solution is something I've never done, and while I have directly updated the plugin registration table, it is certainly something to minimize.
As unpleasant as it sounds, to get back to a good state in a supported way you may be looking at having to:
Backup the SQL database
Backup all the data from any managed solution entities.
Undo all dependencies on the managed solution (i.e. edit all the workflows so they no longer depend on the managed solution). To ease the pain of this piece you might want to experiment with exporting the affected workflows via an unmanaged solution. Then you could delete them rather than trying to weed out the dependencies. Then after you have the managed solution back in the system, you could theoretically import the unmanaged workflow solution to restore the workflow. But, admittedly this working depends on workflows finding the plugin assemblies they depend on by name rather than Id, which I'm not sure is the case - so like I said, experiment.
Unregister the "out-of-band" plugin
Uninstall the managed solution
Install a clean copy of the managed solution, INCLUDING the previously problematic plugin.
Restore/reconfigure the workflows
Restore the managed entities data
It's a lot... so much in fact that I would consider opening a Microsoft support ticket to see if they can provide any alternative methods to correct the situation.
In this situation I personally might also consider unsupported methods like using SQL to copy the tables of any managed entities before deleting the managed solution and then using SQL to copy the data back after the managed solution is fixed. Of course I (almost) never recommend using SQL in an unsupported way, so explore that option at your own risk (and with copious backups).
First, try to avoid direct DB updates in system tables whenever possible. You never know when it will hit you (next solution import, next CRM upgrade, moving to cloud, etc).
I assume that yours vendor solution contains entities and attributes and not only assemblies with SDK message processing steps. Thus you can't just simply remove that managed solution cause there will be data loss. Also I assume there are no workflow activities in their assemblies.
Ask them for solution with properly registered assemblies and SDK message processing steps. Then go into your organization with plugin registration tool (https://msdn.microsoft.com/en-us/library/gg309580.aspx) and unregister their assemblies. Then just import their latest solution. It should be able to import their assemblies with whatever is inside them.
It's good idea to restore copy of prod organization and playthrough whole process in safe environment first.

An unmanaged Solution can be published as a managed Solution

Can you explain to me what it means :
An unmanaged Solution can be published as a managed Solution
Thanks in advance,
Publish is a slightly misleading word to use. What you in fact do in dynamics is Export a solution.
With that said, when you export a solution (as a zip file) you have 2 options during the export process. This is what they are and what each mean:
Unmanaged
When you import this into the target all components included in the solution are installed/overwritten. All of the components are editable on the target environment and fully customisable.
Deleting the solution will not remove any of those components, it just removes the solution reference leaving everything still installed. Think of it like an open box. You empty the contents onto the target, but removing the box simply... removes the box.
In theory this sounds like the worse option, but in a standard release process it's actually more favoured amongst the seasoned developers (that I have worked with anyway).
Managed
Is more of a closed box or a package. All the contents are installed and potentially overwritten (you can choose to maintain customisations, but I'm not sold on this feature yet, it's never proven useful to me).
Using managed solutions gives you control over the "customisability" in the target environment. You can choose to completely lock down a component (effectively make it read-only) or you can allow it to be customised.
Deleting the managed solution completely removes all components from the target server (including data in the entities). Hence why I call it a closed box/package. Although, to be honest, I have never successfully managed to delete a larger solution from an environment so not sold on this feature consistently working.
Managed solutions are usually best saved for "products" or "addons".
Also worth noting, you cannot export a solution which was originally imported as a managed solution into that environment.

How Dynamics CRM Ribbon changes are merged from multiple solutions

We have two development teams working on seperate modules of the dynamics crm in different solutions, team A develops customizations in solution A, exports a managed Solution A, this managed solution will be imported on team B's dynamics development organization on regular basis, team B also develops customizations in unmanaged solution B and exports it as a managed solution when it will be given to customer.
When everything is ready Customer can either import only managed solution A or managed solution B on top of managed solution A.
But Both solution A and solution B includes changes to the ribbons. I am wondering how these changes are merged. Because in the above scenario team A's managed solution is imported into the development environment of team B. At this point Team B might have some unmanaged changes to the ribbon as well.
I am wondering how does dynamics CRM merges these changes. And I am wondering if there can be a case where changes in solution A can be overwritten by Solution B. Even though they are completely mutually exclusive.
From what I deduce from customizations.xml, when I import a managed solution, I don't see any ribbon changes related to that solution in the customizations.xml any more when I just export an unmanaged solution that only contains application ribbon. Which makes me think that when I import a managed solution, those changes in the managed solution are merged into the application ribbon.
Any information would be appreciated.
As far as I've researched, entity ribbon changes are shipped along entities and they are merged automatically. Global Application ribbon and custom group changes are shipped under client extensions in the solution, as far as I've researched they are also automatically merged when to managed solutions are imported one after another.

Resources