I have created very simple ASP New form which looks as follow:
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<SharePoint:FormField runat="server" FieldName="Name" ControlMode="New"/>
<SharePoint:FormField runat="server" FieldName="Title" ControlMode="New"/>
<SharePoint:SaveButton runat="server" ControlMode="New"/>
<SharePoint:GoBackButton runat="server" ControlMode="New"/>
</asp:Content>
Set it as a New form for Document Set content type using SPD. Also I created a new Document Library, where Document Set is one of the content types. Now, when I add new Document Set in this library, I can see my simple form.

After pressing the Save button, I can see new item 123 as expected.
After that I select it and try to run workflow (2013 SPD WF) on it, but it doesn't start and shows me the following error: "Something went wrong. To try again, reload the page and then start the workflow"

And I can see the following error in the ULS logs:
Failed to look up list item with Id 26 on list with Id 916aff44-93ff-4c93-aeca-b227e249a33a for call to StartWorkflowOnListItem() : System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.WorkflowServices.FabricWorkflowInstanceProvider.StartWorkflowOnListItem(WorkflowSubscription subscription, Int32 itemId, IDictionary`2 payload).
I can see that item with id=26 exists. At least I could see it using the following link:
http://mysite/mylist/Forms/Document%20Set/docsethomepage.aspx?ID=26&FolderCTID=0x0120D520005107FFFB3FE12644B0E708E265E4BA8D&List=916aff44-93ff-4c93-aeca-b227e249a33a&RootFolder=%2Frechenzentren%2FServers%2F123&RecSrc=%2Frechenzentren%2FServers%2F123
However, if I create new item using standard form, the same workflow starts well. Workflow is very simple and consists of the only log activity.
What I have tried:
- Tried to use the same custom form to create item derived from Item in a list. In such a case workflow starts without any issues. So probably, the issue related only to Document Libraries or Document Set.
- Tried to start 2010 SPD WF on this item. It works well. So, probably this issue is related only to new 2013 WF Manager's WF.
- Compare all fields of the both items (created by standard and custom forms). The only difference, which I could see is that in the working item, MetaInfo field contains additional value "docset_SkipProvision:SW|True". I tried to add it to the incorrect item, but with no results.
My ideas why it happens:
- I should do some additional work in my custom form when it comes to Document Set (SharePoint:SaveButton is not enough).
- It is a bug in platform and standard form do something behind the scenes to overcome it (but what?)
Does anybody have some ideas, why it happens and what could I try for troubleshooting? Every suggestions are very appreciated.
PS: Crosspost from Microsoft Forums.
Kind regards, Michael
