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

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

Restrict Delete

(0) ShareShare
ReportReport
Posted on by 39

Hello,

 

I have relation one to many relation with Restrict Delete enabled in Dataverse. so when i try to delete the parent item in PowerApps it does not allow it if the parent item contain child records.

But Powerapps does not show any error when i delete parent item, there's no info whatsoever as to why the item is not deleted.

 

i would like it to say that the item cannot be deleted because it relates to child records.

 

Thanks.

I have the same question (0)
  • Ram Prakash Profile Picture
    5,576 Super User 2025 Season 2 on at
    Re: Restrict Delete

    Hello @Saadssk94,

     

    Make Sure you Publish all customization after making changes. Because i tried the same from end and its throwing alert properly, Screen shot for your reference

     

    Account --> Parent

    Opportunity --> Child

     

    rampprakash_1-1641466594697.png

     

     

    Error Message : 

    rampprakash_0-1641466512307.png

     

    Please mark as Answer if it is helpful and provide Kudos


    Subscribe : https://www.youtube.com/channel/UCnGNN3hdlKBOr6PXotskNLA
    Blog : https://microsoftcrmtechie.blogspot.com

  • Saadssk94 Profile Picture
    39 on at
    Re: Restrict Delete

    Hi @rampprakash 
    ive posted the ss below, im using the dataverse in canvas app. on the "Yes" button there is code to remove selected item but it does nothing when deleting parent with child records present.

    Saadssk94_0-1641466777694.png

     

  • Verified answer
    Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at
    Re: Restrict Delete

    HI @Saadssk94 

     

    Have you setup to handle the IfError code for this process?  Check out the following link: https://www.inogic.com/blog/2021/04/error-handling-in-canvas-apps-power-apps-using-iferror/ and then you should be able to leverage IfError to see if error was returned.

     

  • Saadssk94 Profile Picture
    39 on at
    Re: Restrict Delete

    @dpoggemann 

     

    Thank you this worked wonderfully.

  • Ram Prakash Profile Picture
    5,576 Super User 2025 Season 2 on at
    Re: Restrict Delete

    Hello @Saadssk94,

     

    As per your statement i thought it is from Dataverse environment. 🙂

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

Coming soon: forum hierarchy changes

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 819 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 308 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 222 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics