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

I am trying to delete a couple of files from a document library, but SharePoint 2013 tells us that "the file is currently checked out or locked for editing by another user".

However, when attempting to undo the checkout using code (SharePoint Client Object Model aka. SCOM), an exception is raised that states that the file is NOT checked out. Also, when including the "Checked Out To" column in the list, the field is blank and the "CheckOutType" property of the file in SCOM returns "None".

Using SharePoint Client Browser I found that there is what seems to be an invalid user reference in the "Checked Out To" column when viewing the Raw List Data:

SharePoint Client Browser view of list

I have no idea what might have gone wrong. We cannot delete the files or check them out or in. The files do not appear under "Manage files which have no checked in version".

How do I delete these files permanently?

share|improve this question
1  
Have you read this? dlairman.wordpress.com/2013/03/13/… –  Robert Lindgren Mar 10 at 15:29
    
Yes, but the files do not appear in the list of checked out files. –  mbjdev Mar 10 at 15:50

1 Answer 1

Try deleting the items in PowerShell after setting SPWeb.AllowUnsafeUpdates = true; If that doesn't work you may need to create a new list and move the good list items there and then delete your old list using this method. After that you should be able to recreate the list with the same URL as before and move all of the items back.

share|improve this answer

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.