Notifications
Announcements
No record found.
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
you can use .skipDeleteActions(true)
blogs.msdn.microsoft.com/.../using-skipdeleteactions-with-dodelete-still-calls-the-delete-actions
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 !
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.
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 !
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?
Yeah Right and that's for Cascade+Restricted delete action operation !
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
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2