In this article we can explore Cascade Delete option.
Scenario: We have two lists with connected column
Customer list is connected with Project list, where Customer Name is a column of lookup.
Please specify the lookup list & column name.
The Data Integrity can be maintained through:
- On updating Customers, the change should reflect in Projects
- On deleting Customers, if associated projects exists, delete should be PREVENTED
- Or, on deleting customers, the associated projects should also be deleted (CASCADE)
Now try adding a new customer (Contact Template), please remember to set the Last Name as well.
Now try adding a new Project (Custom List Template) with lookup column & relationship checked.
Once you have a customer & project, try deleting the customer item.
You should receive the following error.
This OOTB feature ensures Data Integrity.
This may not be the case always; some lists will lack OOBT relationship option. We can use custom event handlers to block the deletion option, in such cases.