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
Showing posts with label SPWorkflowTask.AlterTask. Show all posts
Showing posts with label SPWorkflowTask.AlterTask. Show all posts
Tuesday, January 26, 2010
SPWorkflow AlterTask didn’t work with hash table which has space into key name
Labels:
altertask,
custom workflow,
hash table into altertask,
MOSS 2007,
Personal Experience,
SharePoint,
Sharepoint Problems,
SPWorkflow AlterTask didn’t work with hash table which has space into key name,
SPWorkflowTask,
SPWorkflowTask.AlterTask,
visual studio workflow,
Visual Studio Workflow - SharePoint,
Workflow Errors
ERROR: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again
I was getting above error while doing altertask on SPWorkflowTask.AlterTask method.
Solution: we need to write altertask code under SPSecurity delegate and need to write code for Allowunsafeaccess.
http://sansanwal.blogspot.com/2009/08/security-validation-for-this-page-is.html
http://support.microsoft.com/default.aspx?scid=kb;EN-US;970192
Solution: we need to write altertask code under SPSecurity delegate and need to write code for Allowunsafeaccess.
http://sansanwal.blogspot.com/2009/08/security-validation-for-this-page-is.html
http://support.microsoft.com/default.aspx?scid=kb;EN-US;970192
Labels:
allowunsafeaccess,
altertask,
custom workflow,
MOSS 2007,
Personal Experience,
SharePoint,
Sharepoint Problems,
spsecurity,
spsecurity delegate,
SPWorkflowTask.AlterTask,
The security validation for this page is invalid. Click Back in your Web browser refresh the page and try your operation again,
visual studio workflow,
Visual Studio Workflow - SharePoint,
Workflow Errors
Subscribe to:
Posts (Atom)