In this article we will be seeing a new feature called Referential Integrity in
I have created two lists "ParentList" and "ChildList". In the "ChildList" I am
creating a lookup column which will take values from "ParentList". When you
create a lookup column you can see "Relationship" where you can maintain
referential integrity enforcing the relationships defined by lookup columns.
Just like foreign key constraints in a relational database, in SharePoint 2010
you can configure restrict delete and cascade delete rules on lookup column
When an item in the target list is deleted, cascade delete will delete all
related items in the list. For example in the parent list I have the following
And in the child list I have the following items
I have chosen "Cascade delete" and when I try to delete an item "Java" from the
"ParentList" a message will pop up
It will delete all the items related to the list.
Once you delete the "Java" item in the parent list, the child list looks like
the following. Restrict delete:
It will prevent the deletion of an item in the target list if it has one or more
related items in the list.
When you try to delete an item in the parent list you will be getting the
following error message
How to change the content type for files in SharePoint
Reference webpart in SharePoint 2010