1
votes

Is it possible to use InfoPath forms within a SharePoint workflow for all but one of the workflow tasks? Our customer wants a particular task to use the default sharepoint page for editing that list item but disabling the form I was using for that task just makes the workflow default to the Task0_FormURN defined inside workflow.xml. If I make sure this definition is empty or non exsisting then I just get an error. It seems to me that if you want to use InfoPath forms then you need to go all out for every task.

1

1 Answers

1
votes

You are right. You cannot mix Infopath task forms and custom pages in one workflow.

You can try to create a task within workflow with custom code.

var newTask = list.Items.Add(someUrl, SPFileSystemObjectType.File, someTitle);
newTask["AssignedTo"] = new SPFieldUserValueCollection(new SPFieldUserValue(web, id, name));
newTask["StartDate"] = DateTime.Now;
newTask["Body"] = "task body";
newTask.Update();

And in this case your workflow will not be "watching" for task changes. I assume you would watch for workflow item changes with a OnWorkflowItemChanged activity.

hope this helps