Cascade Delete Action in Table D365 F and O
If you want to apply the delete operation automatically on Employee table then in this case you have to create relationship on the Employee Table and Applied On delete property to it.
- You need two table Department table and Employee Table.
- Create a normal relationship between them in Employee Table.
- Set on delete property in Employee Table as cascade. See screenshot.
- Then build and run to see result. When we will delete records from Department Table then Employee table data will be deleted automatically.
Another Way we can think that:
Remember if we want to apply the delete operation automatically on Department Table then we have to create relationship on the Department Table and Applied On delete property to it that relationship.
- You need two table Department table and Employee Table.
- Create a normal relationship between them in Department table.
- Set on delete property in Department table as cascade. See screenshot.
- Then build and run to see result. When we will delete records from Employee table then Department Table data will be deleted automatically.
- If you will delete record from parent table (Employee Table In this Case) all related data from child table (Employee Table) will be deleted without any waring message. Remember that we wanted to apply the delete operation automatically on Department Table that's why we created relationship on the Department Table and Applied On delete property to it.
- If you will delete records from child table parent table data will not be deleted.
Comments
Post a Comment