Saturday 26 March 2011

Cannot delete related SP2010 lists

Problem: You cannot delete either of 2 lists if they are related through a lookup column.  I tried deleting the list instances using Powershell and the SP2010 UI.  The List definition and corresponding content types are being deployed and retracted successfully.  PS error message when deleting either list instance is:
Exception calling "Delete" with "0" argument(s): "This list cannot be deleted because one or more lists are related to it. A relationship between two lists occurs when one of the lists contains a lookup column enforcing a relationship behavior on the other list."
 
Initial Hypothesis:  As I am deploying my lists using content types and there is a lookup column, it is important that they are created in the appropriate order.  As I am chaning my features elements manifest file building out my lists it appears to be that I have got my lists instances tangled so they can't be deleted. 

Resolution: I deployed my solution so that the CT and list definitions were present, I deleted the lookup column using the list setting in the UI.  I could then delete the list instances. 

4 comments:

Alexon said...

same problem,

is any solution?

Paul Beck said...

Alexon - try the resolution steps: 1) deployed the solution so that the Content Type and list definitions are present, 2) deleted the lookup column using the list setting in the User Interface. 3) Then delete the list instance.

Anonymous said...

I am not able to delete that lookup column.. what should i do to delete the list.

Cees Timmerman said...

To resolve problem delete problematic column with unchecked value of “Enforce relationship behavior”. http://kollegaru.wordpress.com/2013/04/18/sharepoint-error-this-list-cannot-be-deleted-because-one-or-more-lists-are-related-to-it/

Post a Comment