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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Cascade + Restricted delete action in D365FO

(0) ShareShare
ReportReport
Posted on by 930

Hi team,

I read blog  

And found the below context

"Example of Cascade + Restricted
Suppose we have three tables (Person ,

Customer & 

Order).

Now Person is a parent of Customer table, and 

Customer is a parent of Order table having (One-To-Many) relations –


If I set a Delete action property on Person table (Parent table) to “CASCADE” for customer table and 

 

If I set a Delete Action property on a CUSTOMER table (Parent table) for Order table to “CASCADE +RESTRICTED”.


So if I delete a record from Customer table (Parent table) then It will first check the record in the child table (Order table) and if exist that warning prompt saying that first we need to delete a record from child table.


But if I delete a record from Person table (Parent table)it will automatically delete a record in Customer table and all records related to customer table in Order table would also be deleted.

Here my question is :

 

How order table record will delete?

It has delete action “cascade+restricted”

Pls advise, thanks
 

Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    240,571 Most Valuable Professional on at

    You correctly stated that it'd be deleted. I don't understand what you mean by asking how it will delete. Please explain what you mean by that.

     

    Note that the usual approach in F&O is using the On Delete action on a table relation, rather then using delete actions. For example, if you add a custom table with a relation to CustTable, you don't need to modify CustTable anymore; you simply create a relation in your table and set the delete action there.

     

    By the way, I see we already discussed Cascase + Restricted delete actions in your older thread Delete action cascade + restricted in d365fo.

  • CU10121822-0 Profile Picture
    930 on at

    Yes Martin, I agreed I posted before also. I confused…

    Just confirm me, which thread approach is correct? I will follow that.

    Pls advise, thanks 

  • Martin Dráb Profile Picture
    240,571 Most Valuable Professional on at

    Well, I still don't what your question here and therefore whether it matches the topic of the other thread.

     

    That you gave them both threads (almost) the same name might mean that it's a single topic, but it's also possible that you just didn't set names correctly. The title isn't very specific.

     

    I also see that you still haven't verified any answer in your old thread, which may mean that you still have some question, but maybe you forgot to do that.

     

    That you created a new thread may mean that you consider it a different topic, but maybe you just forgot about the thread you created a month ago.

     

    I can only guess what you had in mind when you created this new thread. It's you who must explain that.

  • Suggested answer
    Aps10 Profile Picture
    79 on at

    Cascade + Restricted behaves differently depending on how the delete was triggered — that's the part that's easy to miss.

    Delete the Customer record directly and it acts as Restricted: you're blocked if Order records exist.

    Delete the Person record instead, and the Customer deletion happens as part of a cascade rather than as a direct delete. In that case it acts as Cascade, so the Order records are deleted too.

    So both behaviours you described are correct — they're just two different entry points. The reason the combination exists is precisely this: block someone deleting a Customer by hand while Orders exist, but don't let that block break a legitimate cascade coming down from Person. Otherwise the Person cascade would fail every time a Customer had orders.

    Building on Martin's point, which matters more in practice than the semantics: set the delete action as On Delete on a relation in your own table rather than on the standard parent. Same behaviour, and you never touch CustTable.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 349 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 302 Super User 2026 Season 2

#3
CU10121822-0 Profile Picture

CU10121822-0 294

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans