Partager via


SP2013: Creating Document Set using Workflow

In SharePoint 2010 workflows you can create a Document Set using CreateListItem action in SharePoint Designer 2010 but things have changed in SharePoint 2013. You will not be able to create a Document Set using CreateListItem action (either using SPD or VS 2012) in SP2013. When you use CreateListItem action in your workflow for SP2013 Lists (based on Document Set content type) all that it creates is a folder and not a document set.

Here is an excerpt from https://office.microsoft.com/en-001/help/sharepoint-server-2013-known-issues-HA102919021.aspx 

In SharePoint 2010 workflow we were able to create DocSet using Create List Item action in SharePoint Designer, but in SharePoint 2013 we don't support creating DocSet using Create List Item action.

The workaround recommended is to use Workflow interop bridge in SharePoint 2013 workflow and call SharePoint 2010 workflow (where you will use CreateListItem and create document set). Just to make things clear about why this approach - due to the fact that SharePoint 2013 is based on a different platform and has been rebuilt upon it, it was not possible for the capabilities of SharePoint 2013 workflows to fully replace all the functionalities of SharePoint 2010 actions. Lot of investments went to make new features to enable richer new end-user scenarios and gave up less frequently used features based on user feedbacks. Nevertheless, we strongly wanted to cover all the existing scenarios and hence the “Start a Workflow” action was designed to let the end users combine SharePoint 2013 and SharePoint 2010 by enabling inter-workflow calling from 2013 workflow to 2010 workflow. Since SharePoint 2013 workflow infrastructure is built on Windows Workflow Foundation 4 and therefore executes workflows in Windows Azure, some actions from SharePoint 2010 workflows are available in SharePoint 2013 only when using the SharePoint workflow interop . 

Having said that, if you want to completely build your workflows in SP2013 model, you can create your own REST call service and call it using HTTPSend acitivity in your workflow.