Today’s video is about Solutions this is useful for Developers and people who are studying for the CRM Customizations and Configuration exam. Solutions are one of the fundamental parts of CRM customization and CRM Development, they provide a way to manage and package your changes in CRM and importantly a way to move customizations between CRM instances.
If you want to watch the Hosk CRM Dev video on Solutions click the link below
http://www.youtube.com/watch?v=2Ft1GIhqWOE
Otherwise keep reading
Exam criteria
Create and Customize Solutions (10-15 percent)
-
Plan for customization.
-
This topic may include: differentiate between configuration, customization, extending, and development; design appropriate customizations
-
-
Manage solutions.
-
This topic may include: understand business requirements; understand the benefits of Solutions; create Solutions; export managed and unmanaged Solutions; import Solutions; specify a Publisher; work with multiple Solutions; describe Solution components; describe component dependencies
-
-
Manage customizations.
-
This topic may include: describe customization concepts for entities, fields, forms, views, and charts; publish customizations
-
Some of the information below has been taken from the excellent Customization and Configuration in Microsoft Dynamics CRM 2013, although I have tried to remove any direct quotes. I would recommend you read the Microsoft Official Curriculum on Solutions.
Plan for customization is odd because it would seem rather difficult to create questions for, it is very important because one of the important skills of a good CRM developer is choosing the right tool for the right moment and you need knowledge of configuration, Customization and extending
Config – teams, security roles, business units
Customization – standard GUI changes, forms, entities, views, workflows, business rules
extending – javascript, .NET, plugins, workflows etc.
To be honest I’m not entirely sure what they are getting
What is a solution
Solutions in Microsoft Dynamics CRM is a method to let you group and manage your custom components for a particular set of functionality or release but remember solutions are optional, you don’t need to have them and you can if you wish just edit the default solution.
Default Solution
You don’t have to have a solution file you can edit the DEFAULT solution by going to
SETTINGS → Customizations → Customize the system
DON’T RECOMMEND THIS
1. You could only export these changes as unmanaged which would overwrite the other systems with no way of removing them
2. It would be hard to tell what changes you had made
3. it would take longer and longer to deploy them, manage and update them.
Solution best practice is use it to split up business requirements probably either in Sprints/releases or in business requirements.
When an Organisation is created, by default a solution called Default Solution will be created which will include all the components in the system. Customizing the default components without a solution is customizing the default solution. The default solution will also be customizated if you make changes in a new solution because all changes will be made to the custom solution (unless you have imported a managed solution)
It’s possible to export the Default Solution and import this solution into another CRM Instance but you cannot export Default solution from a CRM On Premise to a CRM On line or vice versa.
Why Use solution, how do people use solutions
A solution is a way to package a group of customization’s. There is no limit to the number of solutions and you can package them up and deliver a whole set of changes in one solution.
Solutions provide ways to organize the deployment and development of customization’s. You can provide releases or new functionality.
How do you group the changes, this is personal preference
you can group the changes in terms of functionality e.g. reports, project management solution, easy navigation changes
Or you can group the changes in terms of a release or sprint
you can create solutions for different types of changes, e.g. workflows, entities, plugins
Publishers and Prefixes
Before you can create a solution you must create a publisher.
When you create a certain customizations like entities or fields, CRM will automatically prefix the change with the prefix value held in the publisher specified in your solution. If you are making the change in the default solution, you will be using the default publisher which has the prefix of new
The prefix will then be added before the schema name for the entity or field e.g.
hosk_newField
hosk_entityName
This means if you have two different customizers changing the system with different publishers then they will create components with different prefixes.
If you export your Solution as a Managed Solution, the publisher is especially important because after the solution is imported in the target system only solutions with the same publisher will be able to update those components. So either you can update the components with the same publisher with an unmanaged solution or you can delete the solutions.
Work with Multiple Solutions
Important concept
Solutions are containers, on the original (DEV) system they do not stop anyone changing anything
Solutions are containers to manage and show the changes on on the original system. What these means is if you had a solution, and you changed the Account entity in your solution. These changes would show in the Default solution, your new solution and any other solutions which had the account entity in.M
Your new Solution is a container for a set of components that work together to provide the functionality for which you are asked. To modify the components, you can create new components in your Solution, or add existing components from the system to your Solution.
Even when you are working in your own Solution, any components you create or modify are changed in the Default Solution, because your Solution only contains references to these components, not copies of the components. This means that if you delete the Solution that you are customizing this removes the “wrapper” around the components – the components remain in the system.
This means two customizers can modify components, these changes will automatically be changed in the default solution. In programming terms this is because solutions only contain references to the components not copies. Solutions can be seen as wrappers.
IF YOU DELETE AN UNMANAGED SOLUTION THE CHANGES WILL STILL BE THERE. To remove those changes you have to edit those components
Managed and unmanaged solutions
When you export a solution, you can choose to export the solution as a managed or unmanaged type. I usually remember this by the fact managed solutions are read only when imported into the target system. What I mean by this is you cannot edit or change any of components.
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.
Importing unmanaged solutions will overwrite any changes you had previously made and this cannot be undone and I wouldn’t recommend import unmanaged solutions unless it is from an unmanaged solution from people you work with (and even then think twice)
Managed solutions
Managed solutions on the other hand can be edited and only removed by uninstalling/removing the solution, all the components and all the data. It’s all gone permanently, even if you then remimported the managed solution all the data would be gone
Solution versions – Minor changes
one of those questions which once again personal opinion
small changes to a current set of functionality or solution then you can modify the solution and increment the version number.
if it is new functionality then you have to decide whether to add it into an existing solution with version number increment or create a new solution
Removing Components from your Solution
Removing a component from a solution will remove it from your solution but it is not deleted and will still exist in the Default Solution. You remove a component, you select the component whilst inside your solution and then press the Remove button. This will remove the component reference from your solution but not delete/remove it from the default solution.
Don’t get Remove mixed up with Delete. Pressing the Delete button will delete the component. Important System entities cannot be deleted from the system (Case, Account etc), custom components can be deleted.
Dependent Components
When you try and delete a component that has a dependency, it will pop up a dependent component dialog that informs you there is a dependency and stops you deleting the component
if you try to delete a component which has dependencies then you will need to delete the components which depend on the component you are trying to delete. You may have to remove multiple dependencies.
Required Components
You can see the required components for a component by selecting the component and clicking show dependencies. This will show dependent components and required components.
Required components will not prevent you deleting the component. They are often things like Webresources with JavaScript, plugin, a view. You don’t need these things in your solutions every time but you will need these components to have been imported into the target system at some point.
If you are missing a required component you will get the Missing Required Components Dialog When Adding Components to a Solution. This won’t stop you exporting the solution.
What Can be Added to a Solution?
The following is a list of solution components that you can view within a solution: taken from this blog
- Application Ribbon
- Article Template
- Business Rule
- Chart
- Connection Role
- Contract Template
- Dashboard
- Email Template
- Entity
- Entity Relationship
- Field
- Field Security Profile
- Form
- Mail Merge Template
- Message
- Option Set
- Plug-in Assembly
- Process
- Report
- Sdk Message Processing Step
- Security Role
- Service Endpoint
- Site Map
- Web Resource
What cannot be added
- Business Units
- Teams
- Queues
- Goals
- Subjects
- Product Catalog
The items above must be either created manually or imported. If you want to create manual data and use the same guids between systems then you will need to export and import the data so you can specify the guids used.
How solutions are applied: taken from this great blog post, although I think I have seen the picture on the CRM SDK somehwere but I can’t remember where
All solutions are evaluated as layers to determine what your CRM application will actually do. The following diagram shows how managed and unmanaged solutions are evaluated and how changes in them will appear in your organization.
Publishing
The majority of components work in the usual way
You make the change (the change is not visible or saved, so if you closed the browser the change is lost)
You save the change (not visible to the users yet)
you then publish the change to make it visible to all user
When you import a managed solution it will publish the changes automatically but if you import an unmanaged solution then you will need to publish those changes.
Some components do not need publishing and some do
These components need publishing
- Application Ribbon
- Entity
- Entity Relationship
- Field
- Form
- Message
- Option Set
- Site Map
- Web Resource
One final point regarding the publishing customizations, users may experience some problems, slowdown so it’s best practise not to publish customizations during working hours and to publish the customizations at time when the system is not busy
Export and Import Solutions
To move the customizations between systems you can export your solution from one CRM instance and import it into another CRM system. The solution is exported as a zip file.
Inside the zip file there will be a few XML files
solution
[Content_Types]
customizations
depending on what customizations you have in your solution there could also be javascript js files and plugin dll’s, image files etc.
It’s good policy to keep backups of your exported customizations in case you need to roll back your customizations.
Don’t forget there are more videos on the youtube channel Hosk Dev CRM or if you are just interested in Videos for the MB2-703 Certification – CRM 2013 Customization and Configuration exam there is a playlist you will find useful
https://www.youtube.com/playlist?list=PLsOVDEkdRUuyY0xRq8flZ-ePOcBvZ-XpJ
Some useful thoughts, but I think you should be careful not to use quite so much material from the Microsoft Official Courseware without a) saying that is where the content came from and b) perhaps checking with Microsoft Learning that they are happy for you to do so.
I am happy that you though the content in the course was useful, since I wrote the chapter you are quoting several chunks of in your article, but I don’t think you should be passing it off as if it was your own original thought.
It is good that you have attributed some of your other sources though.
LikeLike
Very good point and I would say the solution chapter is excellent.
I thought I had taken most of the direct quotes out from the post but clearly I had done a terrible job at that.
I will certainly mention the MOC at the start of the blog post, it was there in an earlier draft but got removed.
I will rewrite the article to take out those direct quotes
Thanks for pointing this out,it wasn’t my intention to take credit for the MOC and indeed your work
LikeLike
No worries, Ben. Just don’t want MS legal knocking on your door!
LikeLike
hey hosk, whats uuuuuuuuuuuuuuppppppp
sorry for my bad english.
i need to ask you something about CRM Dynamics 2013 On Premise SP1.
i have the follow scenario:
i have 2 solutions:
1 unmanaged and 1 managed
the managed solution is the parrot app downloaded from CRM App Store.
the unmanaged solution is my solution with my customizations.
the point is my solution needs some components of the managed solution, then i add these components to my unmanaged solution.
but when i try to import my unmanaged solution(with components added from managed solution) to my CRM, the wizard tell’s me “hey bad guy you need a lot of components(components that i added from the managed solution) and your crm don’t have these components”.
then the ask is “it’s possible add components from managed solution to a unmanaged solution and export unmanaged solution to another CRM?”
i hope you can understand me 😛
🙂
LikeLike
Have you imported the managed solution into the environment you are trying to import to.
You can’t add managed solution components to you unmanaged solution but I think you can import the managed solution into the other environment and then you might be able to import it
LikeLike
Hello Hosk,
I found this question on MB2-703 demo book by Microsoft.Can you please explain the answer how B isn’t true and how D is….
Which two statements about Solutions are true? Each correct answer presents a complete
solution.
A. A Solution created in Microsoft Dynamics CRM 2013 can be imported into a Microsoft
Dynamics CRM 2011 database.
B. Deleting a managed Solution deletes all the Solution components, including the data.
C. You cannot export a managed Solution.
D. An unmanaged Solution can be published as a managed Solution.
Answer: C,D
LikeLike
B is true, unless maybe the managed solution has my default components in.
You can export an unmanaged solution as a managed solution and then import it.
LikeLike
Hi Hosk,
It didn’t read your comment carefully.. you are right that unmanaged solution can be export as managed solution. Sorry for earlier wrong comment
LikeLike
How can I code for adding two numbers from two fields on LEAD form and putting result in third field on that same form in Dynamics CRM 2015 online? I am creating a plug-in and there is no function like (entity.setAttribute) but have a function (entity.getAttribute). So I am failing to put the result in third field.
LikeLike
I would raise a question on the CRM forum and provide some code people can see what you are doing
it depends on whether the plugin in a pre or post, are you using early bound code??
here is the CRM forum link
https://community.dynamics.com/crm/f/117.aspx
the quick answer is you usually update or add the value to the entity. On a pre you just add the field on a post you update the entity and CRMservice.update(entity)
Try reading these blog posts they have examples of plugins
https://crmbusiness.wordpress.com/2014/04/07/crm-2013-step-by-step-update-plugin-tutorial-using-the-crm-2013-development-toolkit/
https://crmbusiness.wordpress.com/2014/05/09/crm-2013-plugin-step-by-step-guide-for-a-post-account-create-plugin-using-the-developer-toolkit/
http://crmbook.powerobjects.com/extending-crm/plug-in-development-and-workflow-extensions/plug-ins/developing-a-plug-in/
LikeLike
Quick question. I have recently assumed the position of a CRM customizer. I have found unmanaged solutions that were created by previous customizer but have no description for what they were created for. How can i find out what area or entity they impact?
LikeLike
Go to the solution and open it. This will show you want entities are in the solution and customisations in the solution. If they have plugins you will need to find the projects with those in.
Remember the same customisations and entities can be in multiple solutions
LikeLike
I appreciate your quick response. Found out it has an entry on “Client Extensions” with the following description “XML data used to control the application navigation pane” Trying to find out what that is.
LikeLike
Hello HOSK
i wanna know clear explanation about pipe line stages with examples
LikeLike
Sorry, I’m responding to an old post, but I just came across a situation where the customer has multiple managed and unmanaged solutions in a single on-premise CRM instance. If they need to upgrade to a new instance, do you have any techniques for adding an “order of installation” note in the system? I want to re-create existing forms with the same layout but I don’t know what order the solutions were imported.
LikeLike
You could put an order number in the description
LikeLike
Can you describe the behavior of the managed solution layer with multiple ISVs? Suppose your CRM has Solution 1 where Account is still customizable according to its Managed Properties. You plan to import Solution 2 in which a system entity (i.e., Account) is completely uncustomizable by way of setting all Managed Property options to False.
Does “Last one wins” apply to this scenario? Would Account be set to uncustomizable after the import of Solution 2?
LikeLike
Apologies if this comment appears twice.
Can you describe the behavior of the managed solution layer with multiple ISVs? Suppose your CRM has Solution 1 where Account is still customizable according to its Managed Properties. You plan to import Solution 2 in which a system entity (i.e., Account) is completely uncustomizable by way of setting all Managed Property options to False.
Does “Last one wins” apply to this scenario? Would Account be set to uncustomizable after the import of Solution 2?
LikeLike
When you apply multiple solutions, common fields the last one will win.
As the account is a default entity you cannot make it uncustomizable but the new fields in a solution would be uncustomizable.
LikeLike
Previous person who was working here created a managed solution from our Dev environment and moved it to another sandbox environment that was allowing us to preview v.9. The problem was that it wouldn’t at the time allow for an unmanaged solution to be moved to the newer version. BUT here’s the problem – they continued to do their development in the default solution on top of the managed solution. But now everything from the base is locked up (things can’t be changed there are field compatibility issues). Is there a way to take the unmanaged components that were built in the new application and move them back to the original Dev instance and not lose any of the config that has been done?
Best,
RG
LikeLike
Can you export the changes in an unmanaged solution and import them to the dev environment
LikeLike