Skip to main content
replaced http://sharepoint.stackexchange.com/ with https://sharepoint.stackexchange.com/
Source Link

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 answerthis 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 heredetails 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?

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?

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?

Notice removed Draw attention by CommunityBot
Bounty Ended with Monica Jagani's answer chosen by CommunityBot
Tweeted twitter.com/StackSharePoint/status/778255844467154944
Notice added Draw attention by Jonathan Holvey
Bounty Started worth 50 reputation by Jonathan Holvey
Source Link

SharePoint Online file lock not released when workflow is running

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?