Hello everyone. I'm looking for an approach to prepopulate custom field in the workflow task. I have added Custom Content Type to my ordinary task list (enabled content types management, cleaned and reordered content types order, and hide some fields that end users shouldn't see). Next, in the VS I've added CreateTaskWithContentType Activity and bond method invoking in which I populate task's fields. To populate my custom field I use
taskProperties.ExtendedProperties[myFiledGUID] = fieldValue;
But problem is that fieldValue is SPFieldUserValueCollection which can not be serialized (I've got an error about it). Then I tried
taskProperties.ExtendedProperties[myFiledGUID] = fieldValue.ToString();
I also tried to do this in Code Activity. I tried to receive item from the task list directly (because I have a uniqueId of the taskItem), but at the moment of runtime that item is not yet created. And of corse I got an error.
And I also heard about OnTaskCreated bug.
So, any ideas how to populate my custom task field?
Best regards, Vladimir Titkov.