Question

Currently I have three lists.
The 1st list contains a single column.
The 2nd list contains two columns - one of the columns performs a lookup on the 1st list.
The 3rd list contains three columns - one of the columns is a cascading drop-down on the 2nd list.
(Cascading Drop-down field reference: http://datacogs.com/datablogs/archive/2007/08/26/641.aspx)

Lookup field or Cascading drop-down field have one (and also the biggest) weakness, that is:
If I delete an item in the 1st list, which was also being lookup on the 2nd list and also used in the 3rd list cascading drop-down list, everything will fall - the domino effect!

So my question is, are there ways or solutions that prevent a user from deleting an item in a particular list that might be already lookup by another list or used in a cascading drop-down list? (If possible, the user that wants to delete this item, gets a message telling that this item is used in another List and displays the List name.)

Was it helpful?

Solution

No code solution:

You can build custom Permission Level disabling Delete Items permission. Then you use this new Permission level on 1st list.

Code solution:

Use Event handler and OnItemDeleting method

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top