Dear All,
I have created 2 Tables like Parent Table ( Student details ) and Child Table ( Mark details )
Student details :
Fields > Student Id, Name
Mark details :
Fields > Student Id, Marks, Division, ClassStnd
Then I set Delete action on Child Table ( Mark details ) ****
Properties :
Action = Cascade
Then I create a records in Parent Table ( Student details ) and Child Table ( Mark details )
Student details :
Mark details :
Now I am going to delete record form Parent table ( Student details )
Student Id = "S001"
Then browse Child Table ( Mark details )
here I saw Student Id = S001 in Child table ( Mark details) still exist even student id = S001 deleted in Parent Table ( Student Table)
Now again I create a new record in Student Table
Student Id = S001
Now I deleted record form Child Table ( Mark details)
then browse Parent Table ( Student details )
Here we saw Student Id = S001 is not there in Parent Table because we deleted Student Id = S001 from Child Table.
My Question is :
1. Is it always mandatory to set delete action in Child table.
2. In Parent Table (Student details ) can I mention delete action for Child Table ( Mark details) ?
Please give me more shed on this.
Thanks!
*This post is locked for comments
Thanks Sukrut
That means now delete action is only depends on Table relation . It's either Parent table OR Child Table.
I'm just copying my previous answer since it contains the information that you are asking for:
In D365FO the delete actions should be defined in the table relations. There is a property called OnDelete.
The Delete actions that are discussed in this thread are a legacy feature from AX2012 - although they still do work.
Hi Nikolaos
Just now I saw On delete property in Table relation in Child Table. It set to "None".
If I set "On Delete"property to "Cascade" in table relation then no need to create Delete action in delete action node ? Right
Please give me more shed on this.
Thanks!
Like I wrote:
In D365FO the delete actions should be defined in the table relations. There is a property called OnDelete.
Did you already look into the properties of the table relation?
Thanks Nilolaos,
In Child table (Mark details) I making a relation with Parent table ( Student details) :
Mark details ( Child Table) :
So, it's always preferred Delete action on ( Child table ) because table relation is here not in Parent table ( Student details).
Can you please let me know where is "On Delete "property ?
Please give me more shed on this.
Thanks!
In D365FO the delete actions should be defined in the table relations. There is a property called OnDelete.
The Delete actions that are discussed in this thread are a legacy feature from AX2012 - although they still do work.
Hi,
For example, use a cascading delete action to specify that the system is to delete a customer's address when that customer is deleted from the CustTable table. Another example is to use a restricted delete action to prevent a customer from being deleted from the CustTable if one or more transactions exist for the customer in the CustTrans table.
take a look at the link below,
docs.microsoft.com/.../how-to-create-delete-actions
Best,
Uday.
Hi @rp@n!
It is not mandatory to setting delete actions. It is always depends of your solution.
As example SalesTable and SalesLine.
If you delete records from SalesLine table you shouldn't delete record from SalesTable, but if you delete record from SalesTable you should delete records from SalesLine.
Mohamed Amine Mahmoudi
100
Super User 2025 Season 1
Community Member
48
Zain Mehmood
6
Moderator