views:

947

answers:

2

I have a custom (code-based) workflow, deployed in WSS via features in a .wsp file. The workflow is configured with a custom task content type (ie, the Workflow element contains a TaskListContentTypeId attribute). This content type's declaration contains a FormUrls element pointing to a custom task edit page.

When the workflow attempts to create a task, the workflow throws this exception:

Invalid field name. {17ca3a22-fdfe-46eb-99b5-9646baed3f16

This is the ID of the FormURN site column. I thought FormURN is only used for InfoPath forms, not regular aspx forms...

Does anyone have any idea how to solve this, so I can create tasks in my workflow?

+2  A: 

Are you using the CreateTaskWithContentTypeId activity in your workflow? If you are then you need to ensure that the content types have been added to the Workflow Tasks list. SharePoint will not add them automatically.

Oisin

x0n
+1  A: 

It turns out that I was missing two things:

  • My custom content type neeeded to be added to the workflow task list
  • I needed to add an empty FieldRefs element to my content type definition; without it, the content type wasn't inheriting any workflow task fields.
Paul Lalonde