Workflow createTask: How to customize regular InfoPath task template?
-
16-10-2019 - |
Question
Can I customize the InfoPath task form which is used by the regular createTask activity?
I know I can create my own form and reference that in the elements.xml
file, but I like using myForm.TaskProperties.Title = "Please upd...";
or is that also possible with a custom form (having TaskProperties
)?
Basically I don't like the standard task form which gets created when using the createTask activity, so I e.g. want to delete the field "Predecessor" and delete some other fields. All I want is a task with some comment field and a "finish task" button.
Solution
Found the solution: Create your own task form and call it via CreateTaskWithContentType
.
A nice explanation can be found here: CreateTask method - how to create a task based on a Custom content Type and a tutorial on how to create your own Task form inheriting form the workflow task content type: Wrangling SharePoint Workflows with Visual Studio