This is the follow-up post for the Using Custom Task Forms with Nintex Workflow and is an example implementation of the custom task form using dynamic loaded user controls. The way this works is that the CustomForm.aspx is called by the Nintex workflow task along with some parameters. With this a context is created containing some variables associated with the workflow. The content type name is parsed so that the correct user control is loaded. To get start with the solution, please follow these steps:
- Deploy the solution from visual studio to your SharePoint site.
- Add the workflow to a list (DemoWorkflow.nwf). Create a custom one, doesn’t matter, just so you can start the workflow on a list item.
- Edit the script (nintex.contenttype.bat) to set the correct SharePoint URL, and run it.
- Start the workflow on a list item, and check the Workflow Tasks list. If everything went right you should have a task here, and when you click it you will see the custom form show a dynamic loaded user control with a link to my wonderful blog.
You can download the solution here.