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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Delete action operation

(0) ShareShare
ReportReport
Posted on by 12

Having a Parent table and child table how can we perform cascade+restricted operation through X++ code and thereby performing the delete action operation by avoiding the warning message

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    you can use .skipDeleteActions(true)

    blogs.msdn.microsoft.com/.../using-skipdeleteactions-with-dodelete-still-calls-the-delete-actions

  • VV-22040800-0 Profile Picture
    12 on at

    Thank you so much for replying with a link and can you explain brief on where to insert this code and there any additional things to do !

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    By supposing that you are trying to delete records from one table, and you don’t want DeleteActions to be executed, you can put tableBufferName.skipDeleteActions(true) prior to actual call of delete_from

    As you can see its practical demonstration in given URL above, which is very much self-explanatory.

    If you are trying to do something else than Delete you can further explain your question. So we may provide you a detailed or different answer.

  • VV-22040800-0 Profile Picture
    12 on at

    Dear sohaib actually I had confusion with Cascade+Restricted delete operation and how to implement through validatedelete() in order to delete the record in parent  table and thereby deleting related record in child table  without any warning message !

  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    so what I understood you want that your childTable records should be deleted automatically? so system should not warn you on deletion of a parent record?

    Am I correct in understating?

  • VV-22040800-0 Profile Picture
    12 on at

    Yeah Right and that's for Cascade+Restricted delete action operation !

  • Verified answer
    Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    So, my question, here in such situation would be:

    "why you don't change your delete action type to Cascade on your parentTable"??

    Doing so, will delete child records forcefully prior to record deletion in parent table

    If your child records are useless and you think deleting those is a good idea,, you have choice to change  delete action type

  • VV-22040800-0 Profile Picture
    12 on at

    Yeah Thank you so much for the valuable response !

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans