If you’re trying to update a task item that is linked to a running workflow using code similar to
public UpdateTaskItem(SPList taskList, int identifier, string newValue) { taskItem = taskList.GetItemById(identifier); // Update task item taskItem["fieldname"] = newValue; taskItem.Update(); } |
and receive an error stating This task is currently locked by a running workflow and cannot be edited, a simple fix is to update the built in field WorkflowVersion to the value 1 prior to calling the Update method.
Read more