While creating hash table for passing into altertask method, we need to be very careful, because it didn’t like spaces into key name, we need to put our key without spaces.
Sample Code:
taskHash["UserInputField"] = UserInputField.Text;
taskHash["UserInputField_ForHash"] = UserInputField.Text;
taskHash["Status"] = "Completed";
taskHash["Status_ForHash"] = "Completed";
SPWorkflowTask.AlterTask(taskListItem, taskHash, true);
Reference Link:
http://www.databaseforum.info/10/1131769.aspx
Hello Sanket,
ReplyDeleteI had a similar problem, in my case there were special non-english alphabet characters which caused that task was not updated, I made a small posting on my blog:
http://honga.super6.cz/2009/12/sharepoint-altertask-method-problem.html
Hi Honga,
ReplyDeleteIts good to know about different cause of same problem, I have looked into your blog regarding same problem, you really explained it very well.
Thank you,
Sanket