cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Saadssk94
Frequent Visitor

Restrict Delete

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.

1 ACCEPTED SOLUTION

Accepted Solutions
dpoggemann
Super User
Super User

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.

 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

View solution in original post

5 REPLIES 5
rampprakash
Super User
Super User

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

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

 

dpoggemann
Super User
Super User

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.

 

Hope this helps. Please accept if answers your question or Like if helps in any way.
Thanks,
Drew

@dpoggemann 

 

Thank you this worked wonderfully.

Hello @Saadssk94,

 

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Users online (4,173)