Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Delete action in D365FO

(0) ShareShare
ReportReport
Posted on by 22

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 ) ****

2352.S1.jpg

Properties :

82353.S2.jpg

Action = Cascade

Then I create a records in Parent Table ( Student details ) and Child Table ( Mark details )

Student details :

5584.S4.jpg

Mark details :

S6.jpg

Now I am going to delete record form Parent table ( Student details )

Student Id = "S001"

S8.jpg

Then browse Child Table ( Mark details )

S9.jpg

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

S10.jpg

Now I deleted record form Child Table ( Mark details)

S11.jpg

then browse Parent Table ( Student details )

S12.jpg

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

  • @rp@n Profile Picture
    22 on at
    RE: Delete action in D365FO

    Thanks Sukrut

    That means now delete action  is only depends on Table relation . It's either Parent table OR Child Table.

  • Verified answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Delete action in D365FO

    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.

  • @rp@n Profile Picture
    22 on at
    RE: Delete action in D365FO

    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!

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Delete action in D365FO

    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?

  • @rp@n Profile Picture
    22 on at
    RE: Delete action in D365FO

    Thanks Nilolaos,

    In Child table (Mark details) I making a relation with Parent table ( Student details) :

    Mark details ( Child Table) :

    s15.jpg

    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!

  • Suggested answer
    nmaenpaa Profile Picture
    101,158 Moderator on at
    RE: Delete action in D365FO

    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.

  • Suggested answer
    udaY-ch Profile Picture
    4,643 on at
    RE: Delete action in D365FO

    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

    https://amazingax.wordpress.com/2013/01/13/microsoft-dynamics-ax-2012example-of-cascaderestricted-and-cascade-restricted-delete-action-property-for-a-table-relation/

    Best,

    Uday.

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at
    RE: Delete action in D365FO

    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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
Zain Mehmood Profile Picture

Zain Mehmood 6 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans