Code Fix: An error occurs when adding a folder to a SharePoint Document Library, and the workflow is set to start when an item is added

  • 16 February 2021
  • 0 replies
  • 6 views

Badge +6
 

Code Fix: An error occurs when adding a folder to a SharePoint Document Library, and the workflow is set to start when an item is added

KB002155

PRODUCT
K2 Five 5.0
K2 Five (5.0) Fix Pack 4
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

 

Issue Description

When manually adding a folder to a SharePoint Document Library and a workflow is set to start when an item is added, an error occurs. The functionality to start a workflow when adding a folder is not available, which means the workflow should not start. However, when designing a workflow in K2 Studio or K2 Designer for Visual Studio and an Item Reference is used to set a property for example “Folio”, the event receiver attempts to start the workflow, which causes the error.

Error Message

The error states that: “Microsoft.SharePoint.Client.ServerException: Cannot invoke method or retrieve property from null object. Object returned by the following call stack is null. 'File'”. This error message is displayed in K2 Workspace > Workflow Server > Error Profiles > All or K2 Management > Workflow Server > Errors > All.

Resolution

  1. Ensure you have K2 Five installed.
  2. Get the K2 Five FP4 from Regional Support.
  3. Install the K2 Five FP4 to apply the fix.
  4. When adding a new folder manually the workflow will not start.

 


0 replies

Be the first to reply!

Reply