Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Export solution with ExportSolutionRequest throw error if it has a patch

Posted on by 150

Hello Guys.

I'm trying to export an unmanaged solution which contain a patch. When i execute the Request, the following error is thrown:

"Cannot modify solution because it has the following patches"

Here is the code I'm using to export the solution:

                    ExportSolutionRequest exportSolutionRequest = new ExportSolutionRequest();
                    exportSolutionRequest.Managed = false;
                    exportSolutionRequest.SolutionName = solution;

                    ExportSolutionResponse exportSolutionResponse = (ExportSolutionResponse)service.Execute(exportSolutionRequest);

*This post is locked for comments

  • Suggested answer
    RE: Export solution with ExportSolutionRequest throw error if it has a patch

    This is the expected behaviour. Once the patch is created, the base solution becomes a parent and will be locked. So in order to export and import the parent solution, first you have to clone the solution. So that the patch solution will be merged with the base solution and then becomes unlocked.

    Please refer to the below blog,

    365withoutcode.blogspot.com/.../managing-solutions-in-dynamics-365-part_11.html

  • Suggested answer
    Radu Chiribelea Profile Picture
    Radu Chiribelea 6,667 on at
    RE: Export solution with ExportSolutionRequest throw error if it has a patch

    Hi Leonardo,

    This is expected behavior docs.microsoft.com/.../use-segmented-solutions-patches-simplify-updates

    After you have created the first patch for a parent solution, the solution becomes locked, and you can’t make any changes in this solution or export it. However, if you delete all of its child patches, the parent solution becomes unlocked.

    Once you have a patch, you can export the patch

  • Leonardo Mizikami Profile Picture
    Leonardo Mizikami 150 on at
    RE: Export solution with ExportSolutionRequest throw error if it has a patch

    Updating.

    The error is happening in UI too.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans