Managed patch solution not reflecting changes made in optionset - dynamics-crm

I have a solution in Dynamics CRM which serves as the base and I have made the corresponding changes in patch solution.
The change was to make tag to 0
I see that on importing unmanaged base and patch solution, the optionsets were reflected as non-customizable but in case of importing managed base and patch solution, the same changes are not reflected
What could be the problem?

Related

Is there a risk that managed components of an entity in D365 will be changed after some system update?

For example, if I add some more columns to managed view All Tasks, is there a risk that it will be reversed to the original columns after some system update?
If your solution is managed then there shouldn't be, as long as your customizations sit in a layer above the changes made in the system update.
However if your changes are unmanaged and Microsoft decide to import their patch/solution with Overwrite Customizations set to true, you may lose your changes Source - MS Docs - Update A Solution.

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.

CRM update via solution import does not update Quick Find view

We are a Housing Association. We use CRM 2016 SP1. Our Dev and QA environments are single server configuration and staging and production are multiple server config with load balancers. Our custom solutions in QA, staging and production are managed.
We needed to update a "Quick Find Active" view for two of our entities Person and Property with some extra search columns in our staging and production environments.
I added the new columns to those entities' views in Dev environment by going to Settings->Solutions->[custom solution]->Entities->[custom entity]->Views->Quick Find Active [entity]->Add Find Columns. I did the same for both entities.
To deploy the update to other environments as a patch, I exported a standalone solution file that only contained the Person and Property entities with the updated views. I then imported the solution file into the QA environment to test.
Having published the changes in QA after import, I checked the entities' Quick Find Active views in the default solution (Settings->Customization->Customize the system->[custom solution]->Entities->[custom entity]->Views). I noticed that the Property entity was updated with the changes but the Person entity was not. It made no sense.
Having spent some time to search the Internet for an answer to no avail, we decided to try out the patch solution in staging. So we exported the solution file but before publishing the changes we decided to check the update. To our surprise, both entities had been updated. So we did not publish the changes.
Happy with the result and blaming the problem on our QA environment, we decided to go ahead with the deployment to production. We imported the file and check the changes and noticed that this time around the opposite happened to our entities, i.e. The Person entity had been updated but the Property entity had not!
We tried publishing the changes but it made no difference. So at the end we gave up and had to complete the deployment by manually updating the views in production.
I am wondering if anyone else has experienced this oddity. Any help/suggestion is greatly appreciated.
You mention that you are deploying managed solutions, and that your changes are not taking effect. The entities contained in the solution have previously been deployed to the target environments.
If you have previously made any modifications directly to the target environment (which would not seem improbable given that you did so this time), these changes will be in the unmanaged layer, which by default overrides changes in managed solutions:
MSDN says:
Because unmanaged customizations are considered ”above” any managed
solution in terms of conflict resolution, organizations installing an
update to a managed solution may not see their changes applied because
of unmanaged modifications. An option exists to make sure that changes
applied by an update to a managed solution are available.
When you
release an update to a managed solution, the organization installing
the update can select:
To preserve any customizations it has applied on top of your managed solution.
To overwrite any customizations it
has applied on top of your managed solution.
In conclusion: Never make any modifications directly to your target environments if you are using managed solutions. It will cause you issues later.
Thanks to Henrik who replied to my question and put me in the right direction. We managed to resolve this issue. Refer to this page to read the solution.

Add Entity to a specific solution - CRM 2016 SDK

Can I select solution in SDK while creating custom entity?
I have created a patch for solution and now I want to show new custom entities created through sdk only in that patch not any other solution.
How can i do that.Thanks
When you create an entity, it is created in the database and is available to be added to any unmanaged solution. If you want the entity to appear in a specific solution, you have to add it to the solution after you create it.
There is no way to get an entity to appear only in your solution, it will always be visible in the default solution as well (all entities are always visible in the default solution with the exception of system entities, many of those are hidden).

Resources