Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Unable to delete failed upgrade solution

(2) ShareShare
ReportReport
Posted on by 18

I have imported a an upgrade to my solution that contains my model driven app and it failed the upgrade with the following error:

Failed to upgrade solution. Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "appaction_appaction". The conflict occurred in database "db_crmcorecan_20231010_04125369_b9b5", table "dbo.appactionBase", column 'ParentAppActionId'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547

 

When I try to delete the upgrade it gives a different error:

Value cannot be null. Parameter name: key

 

The errors don't mean anything to me and now I can't do anything with this solution since it won't let me import the solution with an upgrade pending.

 

Any ideas to get out of this would be appreciated.

 

Thanks

  • aulieB Profile Picture
    18 on at
    Re: Unable to delete failed upgrade solution

    Thanks @Giraldoj 

     

    Couldn't seem to get anything to work so ended up restoring the environment.

     

    thanks for the suggestions

  • Verified answer
    Giraldoj Profile Picture
    561 Super User 2025 Season 1 on at
    Re: Unable to delete failed upgrade solution

    Hi @aulieB 

     

    Error indicates that there's a conflict with the ParentAppActionId in the dbo.appactionBase table. This might be due to a parent-child relationship where the parent record cannot be deleted due to existing child records.

    You may need to inspect the dbo.appactionBase table to identify any orphaned or conflicting records

     

    that happened to my a few times, it happens because your update was applied but the upgrade/delete failed, and some how some required items are present in the old solution and in the new one as well.

     

    but now you wont be able to delete the new solution it contains a component because its not present in the original solution.

     

    In this case what you can do its create a unmanaged layer in the destination environment, make sure you add those components mentioned in the error no matter if they are in the previous solution or in the new one. then you should be able to delete the new solution because you have the components in the environment. 

     

    or you should be even able to apply the upgrade because now your new solution its not going to remove a key component.

     

    Once you have the components in the unmanaged solution, try to check in detail what is going on with those components and  import the new solution again.

     

    if that does not work, you will have to try deleting that solution using one of these options.

     

     

    • Use Power Platform Admin Center:

           Go to the Power Platform Admin Center.

    Navigate to Environments > [Your Environment] > Resources > Solutions.

    Try to delete the problematic solution from here.

    • Re-import the Original Solution:

      • Before attempting to re-import the upgraded solution, try re-importing the original solution that was last working correctly. This may reset the state and allow you to then upgrade successfully.

    • Use XrmToolBox:

    Tools like the XrmToolBox can be handy for managing and troubleshooting solutions in Dynamics 365.

    Install the XrmToolBox.

    Use the "Solution Management" plugin to see if you can forcefully delete or fix the solution.

     

     

    If nothing works, your last option will be restore a backup of the environment before you start the importing process you can find more information bout that here:

    https://learn.microsoft.com/en-us/power-platform/admin/backup-restore-environments

     

    You can always try to reach Microsoft support as well.

     

    If my response resolved your issue, please feel free to mark it as the solution by clicking accept it as a solution
    This helps others find the answer more easily.

    If you liked my solution, please give it a thumbs up
    would be greatly appreciated. Thank you!

     

    Connect with me: LinkedIn 

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard