6

I am using SP 2013 on-premise. I have an document library named Documents. I have added a new Word document. I try to remove this document, but it gives me an error:

Het bestand is momenteel uitgecheckt of vergrendeld om te worden bewerkt door een andere gebruiker

Translated to English:

The file is currently checked out or locked for editing by another user

In uls I found these errors:

1) =i:0).w|s-1-5-21-2290183699-4262213786-291648712-56877, AppPrincipalName= ,bstrUrl=http://aintranet.myCompany.com/Project ,bstrListName={C0C600AD-327A-4AF1-AA6E-1A280EC93796} ,lID=4 ,dwDeleteOp=4 ,bUnRestrictedUpdateInProgress=True

2) Exception occured in scope Microsoft.SharePoint.SPListItem.Recycle. Exception=Microsoft.SharePoint.SPException: Het bestand is momenteel uitgecheckt of vergrendeld om te worden bewerkt door een andere gebruiker. ---> System.Runtime.InteropServices.COMException: Het bestand is momenteel uitgecheckt of vergrendeld om te worden bewerkt door een andere gebruiker.0x80070021
at Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Boolean bUnRestrictedUpdateInProgress, Guid& pgDeleteTransactionId) at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Boolean bUnRestrictedUpdateInProgress, Guid& pgDeleteTransactionId) - -- End of inner exception stack trace --- at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Boolean bUnRestrictedUpdateInProgress, Guid& pgDeleteTransactionId) at Microsoft.SharePoint.SPListItem.DeleteCore(DeleteOp deleteOp) at Microsoft.SharePoint.ServerStub.SPListItemServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid) at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)

3) Original error: Microsoft.SharePoint.SPException: Het bestand is momenteel uitgecheckt of vergrendeld om te worden bewerkt door een andere gebruiker. ---> System.Runtime.InteropServices.COMException: Het bestand is momenteel uitgecheckt of vergrendeld om te worden bewerkt door een andere gebruiker.0x80070021
at Microsoft.SharePoint.Library.SPRequestInternalClass.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Boolean bUnRestrictedUpdateInProgress, Guid& pgDeleteTransactionId) at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Boolean bUnRestrictedUpdateInProgress, Guid& pgDeleteTransactionId) - -- End of inner exception stack trace --- at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)
at Microsoft.SharePoint.Library.SPRequest.DeleteItem(String bstrUrl, String bstrListName, Int32 lID, UInt32 dwDeleteOp, Boolean bUnRestrictedUpdateInProgress, Guid& pgDeleteTransactionId) at Microsoft.SharePoint.SPListItem.DeleteCore(DeleteOp deleteOp) at Microsoft.SharePoint.ServerStub.SPListItemServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid) at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)

What is wrong?

  • Have you checked out the document? – Joy Rathnayake Aug 21 '14 at 11:35
  • The error is saying some one else has checked out that document. You will have to ask that user to check in/undo check out the document for deleting it – Unnie Aug 21 '14 at 11:38
  • 1
    Or as an admin, override the checkout. – Christoffer Aug 21 '14 at 11:42
5

If you examine the item using PowerShell you can get a better idea of what is going on. In all the cases where I have seen it the lock expires after short period(20 minutes) and has been caused by word setting a lock when a user has selected to edit the file:

$web = Get-SpWeb http://somesite.net
$item = $web.GetListItem("/relative/url/to/item.doc")
$item.file.LockType
$item.file.LockedByUser
$item.file.LockExpires
3

If you are facing this error while deleting empty folder "The file is currently checked out or locked for editing by another user.", Then it might be because of there are documents in the library that don't have a major version published.

Yo can go into the Library Settings and take ownership of the files. Then delete the entries, and the folder can be deleted.

Library Tools > Library > Library Settings > Permissions and Management > Manage files which have no checked in version

  • This is something happening to a SP site I'm managing. Do you know what causes these files to be locked by not visible? What are users doing to these files? – ShooShoSha Sep 19 '17 at 17:11
  • 1
    Files uploaded on SharePoint will be visible to others only when Checked In. If document has no major version published, then only creator can see them. – Aniket Gharat Oct 11 '17 at 11:12
1

Just connect from SharePoint Designer using the farm account. Checkout the document. (The one it already says as checked out). Then checkin back. Now you will be able to delete.

This is an error I have overcome many times.

  • For those with 2010 that have ended up here looking for help... With SharePoint 2010, you can just do an "Undo Check Out" from any user, in SharePoint Designer, that has admin privs. Then the files can be deleted normally (either from web or from the designer). – Brian Knoblauch Jul 22 '15 at 19:31
0

It is very likely the document is opened in Microsoft Office Word, therefor locked exclusively by the client.

'Locked' is a different state than 'Checked Out' as highlighted in 'Bunzab' response.

0

I have similar issue with users, It is very likely the document is opened in Microsoft Office Word by one user with checkout and edit.

They have not properly closed it and checkin.

If you look on file in document library it will have 'Locked' is a different state than 'Checked Out' as highlighted. you need to select it and discard checkout

0

I had the same problem. What I eventually discovered was that when I used the "+New" option to create a new Word Document, that it must have been Shared automatically. I turned off sharing for the file, and I was able to delete it immediately.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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