Wednesday, September 3, 2008

Setting Task Field Values in Custom .aspx Edit Form and accessing through ExtendedProperties

Hi All,

I have a desperate passion on working with windows workflow foundations, i love many things in that but at the same time certain thing happens in such a way that i think no, this should not be the case and never came to know why this happened.

Let me share you the scenario i faced before couple of days.

We know that when we make the aspx page that is associated with the Task Edit form, you can have the Task HashTable properties set on that page and then you can access those properties in the TaskChanged event in workflow.

I caught in a strange problem, i have made the properties on my custom task edit page, i was assigning the values in those HashTable Properties and retrieving them in TaskChangeevent handle in Workflow.

some of the properties have the same name and i was able to retrieve the values, but some of them gets converted to GUID and i cannot access them because they just do not exist in the HashTable collection. you have given some name to the properties and assign the value, but you have to retrieve that value with the help of that name of the property in workflow, but you will find that it will get converted in GUID.

I have done research on this, and suddenly i observed that all the properties which had name same as the any columns in the Task List, then it gets converted in GUID, Strange, very strange but yes this is true. and all those properties which are not the columns names in the Task List, i can retrieve them easily with the same name.

So Bottom line is never use any column name from TaskList in the HashTable collection of custom edit page for task edit, and once you have given property names which are not in the Task list, do not add any columns in the task list with the same column name which are in the property collection otherwise code will not find the column again and converts the column in GUID and you may lose value.

No comments:




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com