Skip to main content

Hi everyone,

 

In K2 Rule designer (K2 Designer), I have 2 actions that execute one after the other (separated with "then").

First action: a smartobject that executes method to Create folder in SharePoint

Second action: tha same smartobject that upload document to that folder.

 

Sometimes I have a problem when executing the second action, because the first action does not finish to create the folder.

 

How to check if the first action has finished, before executing the second action ?

 

Thanks.

 

 

Error :

 

Error occurred trying to Execute (SmoSPDocument) - System.InvalidOperationException: Cannot upload to the folder specified. The folder cannot be found.at SourceCode.SharePoint.Client.DocumentFunctions.UploadDocument(String fileName, ContentType contentType, String fileContents, String subfolderPath, Boolean overwrite, String versionComment, RuntimeFieldi] metadataFields)at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.executeUploadDocument(PropertyP] inputs, MethodParameters methodParams)at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.callCreateMethod(PropertyP] inputs, PropertyP] returns, Method method)at SourceCode.SmartObjects.Services.SharePoint.Content.SmoSPDocument.Execute(PropertyP] inputs, RequiredProperties required, PropertyP] returns, Method method) Error occurred trying to Execute (SmoSPDocument) - System.InvalidOperationException: Cannot upload to the folder specified. The folder cannot be found.

 

 

 

K2 version: 4.6.11

SharePoint 2013

Hi,

The Create Folder method has a return property. You can map that to a control on your form. If that control is not empty then you can assume that the folder was created successfully.  


Reply