Restrict item in List from modification if used in other Lookup or Cascading Drop-down field

sharepoint.stackexchange https://sharepoint.stackexchange.com/questions/18957

  •  22-10-2019
  •  | 
  •  

문제

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.)

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top