Solution: Workflow cancels (System.ArgumentException: ContentTypeId)


Yesterday I copied and pasted one of my 2013 SPD workflows to a new one. All passed well, but my workflow failed on the start with the following error:


RequestorId: 1a9862c8-3314-4e2a-a3e8-85d79f2cd7c9. Details: System.ArgumentException: ContentTypeId 
at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) 
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) 
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

The words about ContentTypeId helped me to identify the cause of the issue quickly. In my new workflow task list defered from the one in the old. Hence, it didn’t have my custom task content types and WF failed when tried to create a task.

So, the solution is pretty simple: Make sure whether your task list contains your custom task content types. If you remeber that you have added them, check whether your WF uses that list (maybe your WF uses another one).

Hope it saves somebody some time.

Regards, Michael.

Custom ASP.NET SharePoint 2013 task form FAQ


In this post I want to collect typical questions, which have high chances to appear if you implement custom SharePoint 2013 ASP.NET task form. I am planning to update this post as soon as I find new information which could be usefull for others. If you have some ideas, what questions and solutions should be included in this post, don’t hesitate to write a comment. Also, if you have a better solution for questions here, please, let me know. It could help us a lot!

Table of contents.

Q1: How to get a reference to a related item from SharePoint 2013 task form?
Q2: Why can’t I update my workflow which was created in Visual Studio?
Q3: Is it possible to use InfoPath task forms in SharePoint 2013 workflows?

Continue reading