Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question
1  
One solution could be that you give access to the lookup lists only to certain set of users. Give normal contribute rights to all users on the 3rd list. If you still want to give access to all 3 lists, there are other ways in which you can revoke access rights for deleting items from list. –  Ashish Sep 8 '11 at 9:10
    
True, I think that is currently the only option to handle such scenario. Do you know which Microsoft Developer handle such scenario as I wanted to feedback this "new idea" to their future SharePoint. –  Wilson Tan Sep 9 '11 at 8:36
    
Did not get what you mean by "which Microsoft Developer". If you mean who works on this in Microsoft, I may not know. But good that you liked the idea. An up vote would help. –  Ashish Sep 9 '11 at 9:13

1 Answer 1

up vote 2 down vote accepted

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

share|improve this answer
    
Thanks Vedran. The Visual Studio mention for the code solution should be install at the server where the SharePoint 2007 is installed, right? (I remember that Visual Studio cannot remote perform operations on SharePoint Server - do let me know if I remember wrongly.) –  Wilson Tan Sep 9 '11 at 7:25
    
Correct. Visual Studio cannot preform remote operations on SP server. Best practice (simplified) is to have development server (SP+VS), make solution there, package solutions into WSP and deploy them on production server. –  Vedran Rasol Sep 9 '11 at 7:46
    
In my company, system developer and business analyst cannot access any server regardless if it is development, testing or production. Also remote control is currently not allowed. I remember that only via Web Services can we perform operations on SharePoint Server 2007 remotely - do let me know if I remember wrongly. May I seek advice from you on recommendation of good source of information for Web Services for beginner? –  Wilson Tan Sep 9 '11 at 8:19
    
There is very few articles and only some limited info on web regarding usage of SP 2007 Web Services. You can find bits here and there :( Asking some specific question: How can I do [something]here on SPSE is good alternative. –  Vedran Rasol Sep 9 '11 at 8:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.