If a value has a key-name that matches the name of a field on the task content type, that value is written to the matching field. If a value’s key-name does not match any of the field for that task, the value is written to the SPListItem.Properties object of that task. The SPListItem.Properties property returns a System.Collections.Hashtable object. Writing data to this object makes it available through the Microsoft Windows SharePoint Services 3.0 object model".
- My task is associated with a content type with site columns called "Comments" and "Description"
- in my workflow code (MOSS sp1)
Task1Properties.AssignedTo = initFormData.Reviewers.ContactList;
Task1Properties.Description = "bla bla";
Task1Properties.Title = "my title";
Task1Properties.ExtendedProperties["Comments"] = "my comments";
Task1Properties.ExtendedProperties["Description"] = "descr";
Task1Properties.ExtendedProperties["Contract"] = "my contract";
However, In the Task.properties I don’t get a Contract item in the Properties collection. The custom properties are not propagated as mentioned by the sdk !!!
I will report this bug (could be fixed in sp2 or in SharepointvNext)