In SharePoint we can use values of one list as lookup values in another list. Sometimes it is required to setup the relation between two lists so that deleting an item in lookup list restrict or allows delete in referenced list.
For a SharePoint column, we can use “Enforce Relationship Behavior” property to achieve this. Lets see how it works-
I have a list “Countries” with only one default “Title” column. I have another “Requests” where “Country” is a lookup column to “Countries” list. Lets go to the settings of “Country” column, scroll down to “Relationship” section and check “Enforce Relationship Behavior”.
Here we have two options, let see what each one does-
- Restrict Delete – If this option is selected, and user tries to delete an item in “Countries” list. If this item is being used by any item in “Requests” list, user will get error message “This item cannot be deleted because an item in the “Requests” list is related to an item in the “Countries” list.“, else item will be deleted.
- Cascade Delete – If this option is selected, and user tries to delete an item in “Countries” list. If this items is being used by an item in “Requests” list, user will get confirmation message – “Sending this item to the site Recycle Bin will also send any related items in the following lists to the site Recycle Bin: [Requests]. Are you sure you want to send the item(s) to the site Recycle Bin?“, else item will be deleted.
So select the correct option as per your requirement.