Lars Nielsen's Discoveries

April 29, 2011

Task form not showing in Manage Form Templates – The specified form cannot be found

Filed under: Development,SharePoint,Troubleshooting — Lars Nielsen @ 8:14 pm
Tags: ,

I hit a problem recently developing a workflow in Visual Studio for SharePoint.  I had created a custom task form in InfoPath and then I decided to change the task form a bit.  When I re-deployed the workflow I found I couldn’t get the new version of the form to pick up; each time you edited a task it used the old version.

I changed everything about the form – the name and the GUID and then redeployed it.  This time when I tried to edit the task I got an error:

The specified form cannot be found

On reading around I found I need to look in the Manage Form Templates page in Central Administration to see if my task form has been marked as Workflow enabled.   The old form was there but not the new form with its new name.

The solution was quite simple but took me ages to spot.  These two vital lines had been deleted from the <Feature> element in feature.xml for the workflow feature:


ReceiverAssembly="Microsoft.Office.Workflow.Feature, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
 ReceiverClass="Microsoft.Office.Workflow.Feature.WorkflowFeatureReceiver"

These two lines of code are the feature receiver that makes SharePoint run its own internal code to install the form.  Without them, the new task form was not being installed properly when the workflow feature was activated.

Advertisements

1 Comment »

  1. Thanks for this great post. I was just about to pull my hairs out.

    Comment by Levent — May 24, 2011 @ 2:26 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: