3

I have a SharePoint Designer workflow which runs on new files in a library, and renames them automatically. Before the file is renamed, the workflow waits until the file is checked in by looking at its Checkout property, and waiting in a loop if this is not empty.

If I upload a file to the library, I'm able to complete the required fields in its properties and check it in successfully. However, if I use the New button at the top of the list to create a new document, things go wrong.

New document button

The file is opened in the O365 online online client (eg Excel) and I am able to edit it. When I return to the library and attempt to edit the properties of the document, I receive the "The file is locked for exclusive use by..." error. The same happens if I try to re-open the file, either in the online or desktop client. After 10 minutes, the lock is released as described in this answer, and I can continue working with the file.

I have tested three scenarios, with the following results:

  1. Workflow enabled, New button clicked - The file is not unlocked after editing
  2. Workflow enabled, file uploaded - No problem
  3. Workflow disabled, New button clicked - No problem

This behaviour I have managed to reproduce in a fresh test library, using the same reusable file renaming workflow (details here if you're interested).

The workflow doesn't make any changes to the file, its properties or the workflow status until the file is successfully checked in, so how is it that it's preventing the file lock from being released by the online client?

1 Answer 1

2
+25

As per Microsoft Support pages - it is expected behavior if the user selected "Edit in [client application name]" to edit the document then after they check it in there is a 10 minute delay before the write lock on the document is released. Reference link : http://support.microsoft.com/kb/899709

Workaround :

  1. If you have Microsoft Office Upload Center installed on your local system then consider clearing cache from settings. Everything should work fine.
  2. Credential Manager, which may be accessed via Control Panel. Simply select the entry for the web application URL in Credential Manager and delete it by selecting “remove from vault“.
1
  • Note that I'm having this problem even when using the online client - the file is never downloaded or uploaded. Also, I'm specifically interested in why my workflow is causing the lock problem, as it's not an issue otherwise. Commented Sep 19, 2016 at 12:09

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.