HOME       BLOG      CONTACT

 

shutterstock_184473665.jpg

Summit 7 Team Blogs

Workflow Task ASPX Forms Won’t Associate in SharePoint 2010

I came upon an interesting (meaning frustrating) new facet of Workflow in Visual Studio 2010 and SharePoint 2010.

I was recreating a simple workflow to prototype part of a design for a customer. It was purposefully as simple a workflow as possible. Basically it created a task using CreateTaskWithContentType waited for the task to complete and then sent an email.

I was attempting to see how an idea for a custom task form would work and if it would be attractive and intuitive to the end user. I created my workflow, created a content type for my custom task, created my custom task edit page, and did my association just the way I would have using SharePoint 2007. (Note: I was using ASPX pages not InfoPath forms for this project.)

The problem was that when I edited a task my custom form was never used! I had everything wired up correctly (I thought) but my form was completely ignored.

After a great deal of double and triple checking I started to look back at my code in Visual Studio to see if I noticed anything new or different in 2010.

One thing caught my eye.

 

INHERITS="TRUE" didn't seem familiar so I looked it up on MSDN and found this:

Inherits Optional Boolean. The value of this attribute determines whether the content type inherits fields from its parent content type when it is created.
If Inherits is TRUE, the child content type inherits all fields that are in the parent, including fields that users have added.
If Inherits is FALSE or absent and the parent content type is a built-in type, the child content type inherits only the fields that were in the parent content type when SharePoint Foundation was installed. The child content type does not have any fields that users have added to the parent content type.
If Inherits is FALSE or absent and the parent content type was provisioned by a sandboxed solution, the child does not inherit any fields from the parent.
Source: http://msdn.microsoft.com/en-us/library/aa544268.aspx

 

I took it out and lo and behold it worked.

So, near as I can tell if the Inherits="TRUE" is left in the content type it will ignore custom forms. Why? I don't know.

Note, that MSDN entry doesn't mention it affecting forms at all.

As an interesting side note, there should be away around the problem, because SPD 2010 can specify custom forms for items that have Inherits="TRUE" and they work.

Anyway, hope this helps someone out there.

SHARE THIS STORY | |