Add delay in execution of workflows to eliminate save conflict with portal attachments
Applies To: SharePoint Online and SharePoint On Premises
Issue: Attachments are not getting added to the item from the portal forms – Save Conflict
Error message in the Portal:
Error: NotFoundError: A requested file or directory could not be found at the time an operation was processed.
Error: error, Details: {“error”:{“code”:”-2130575305,Microsoft.SharePoint.SPException”,”message”:{“lang”:”en-US”,”Value”:”Save Conflict.\n\nYour Changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes.”}}}
(See sample screenshot below)
Cause: This issue occurs when there are workflows configured on the list used in Portal forms. Please check Crow Canyon Worklow Manager and look for workflows configured on the same list for Item Update/Create event. Concurrent item updates by attachment code and the workflows results in the save conflict error.
Resolution: Add few seconds delay for workflow execution (around 10 seconds) in the workflows configured on the list for Item Create/Update event
SharePoint On-Premises:
To go to Workflow Manager, go to Site Actions –> Crow Canyon Workflow Manager –> Edit the workflow configured on Item Create/Update event for the list and add the delay in seconds (See sample screenshot below)
SharePoint Online:
Go to Application Administration –> Crow Canyon NITRO Apps –> Crow Canyon NITRO Apps –> NITRO Workflows Manager –> Edit the workflows on Item Create/Update event on the list and add the delay in seconds (See sample screenshot below)