web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to Delete Model...
Power Apps
Suggested Answer

Unable to Delete Model App from Environment

(0) ShareShare
ReportReport
Posted on by 18
I have a Model App that I am not able to delete from the Environment we created it in. When trying to delete I get this error:
 
Sql error: Statement conflicted with a constraint. The DELETE statement conflicted with the REFERENCE constraint "appaction_appactionrule_classicrulesOne". The conflict occurred in database "db_crmcorenam_20230910_01180642_8f7d", table "dbo.appaction_appactionrule_classicrulesBase", column 'appactionid'. The statement has been terminated. CRM ErrorCode: -2147185375 Sql ErrorCode: -2146232060 Sql Number: 547
I've removed everything from the app - just have a single data page pointed at one of our tables, but I still cannot get it to delete. Any ideas/suggestions for how to resolve?
Categories:
I have the same question (0)
  • Suggested answer
    Gabriel G. Profile Picture
    831 Super User 2025 Season 2 on at
    Hi there,
     
    I'm not sure I understand your situation. Here is what you need to do to delete a model driven app from a solution/environment:

    Go to Make.powerapps.com and reach 'Solutions':

     
    Use Default Solution, which is the first one down:
     
    Then on the '...' on the model-driven app you want to delete, you use Delete from environement:
     
    It is the same way you did ? Otherwise, we gonna need more information about your situation.
     
    I hope it helps!
    _____________________________________________
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
  • jrrausch Profile Picture
    18 on at
    Yes, those are the steps I am taking that is generating the error message in my original post.
  • venturemavenwill Profile Picture
    1,189 Super User 2025 Season 2 on at
    Try adding an empty page to the model driven app, and then publish the app again. 
     
    After that, try deleting it. 

    You may have an orphan reference in the model driven app. Even though you deleted the tables from the model driven app, the reference is still there, which prevents the model driven app from being deleted. 
  • jrrausch Profile Picture
    18 on at
    Thanks for the idea.
     
    I have removed everything that was originally in the app and now just have a single page with the Dynamics Overview Dashboard, but still the same issue.
     
    This is what the app looks like now:
  • venturemavenwill Profile Picture
    1,189 Super User 2025 Season 2 on at
    Try going to classic, and make sure that all dependencies are really gone (entities, BPF, etc)
  • BenLeung Profile Picture
    10 on at
     
    I just met the same issue, here's my way to delete the application
    1.  get appmoduleid from url of the MDA editor.
    2.  leverage the SQL4DBS (XrmToolbox tool) to query the related appactionid and appactionruleid
    3.  use Dataverse REST BUILDER (XrmToolbox tool) to disassociate appactionid with appactionruleid you query at step 2
    4.  use Dataverse REST BUILDER delete the app action record by id
    5.  once delete all the app actions, try to re-delete the model driven app.
  • Suggested answer
    Van Nguyen Anh Profile Picture
    2 on at
    In my case, I have to go to "Show dependencies" of Model-driven App. After that remove all dependencies which have Object type is "App action".

    When all "App action" dependencies were removed, I able to delete my app.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard