4

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?

2

1 Answer 1

3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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