views:

155

answers:

0

So this is my question: how do I add a 'Save Draft' button, to a Visual Studio Sharepoint workflow, which will save the form information to the task list, but not complete the task?

I copied the ListForm template for the tasks and added an <asp:Button runat='server' Text='Save Draft' OnClick='???'/>, but now I'm stumped.

I implement my workflows in the usual way: in a While activity there's an OnTaskChanged activity which validates the form, and if all fields are valid, I exit the While and do a CompleteTask activity. To be able to distinguish between the normal 'Ok' button and the newly added 'Save Draft', I need to somehow access the ASP.NET form postback data from the OnTaskChanged activity. Is it possible, and if so, how?

Another way would be to add an OnClick handler to the 'Save Draft' button, and make it change a custom hidden field in the task to a predefined value, which I can then detect. Can I even do this? If so, how?

Thank you for help.