SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a custom approval worfkflow for an listitem. Now I need to see the values of the item in the taskitem. So I think one way would be to attach the ListItem to the TaskItem.

Does anybody know how do solve this problem? Or does anybody has a better idea?

My Idea:


But Taskitem.Attachments.Add needs a byte[] as parameter.

share|improve this question

I'd do it all from the code, by adding a variable (property) to ExtendedProperties.

  • In case task is being created (CreateTask activity) and variable has not been defined yet:

    TaskProperties.ExtendedProperties.Add["List_Item_URL", workfloProperties.Item.Url.toString()];

  • In case task is being modified after task was created (e.g. using onTaskChanged) and:

    • If variable has not been defined yet:

    AfterTaskProperties.ExtendedProperties.Add["List_Item_URL", workfloProperties.Item.Url.toString()];

    • If variable has previously been defined (e.g. during creation of the task):

    AfterTaskProperties.ExtendedProperties["List_Item_URL"] = workfloProperties.Item.Url.toString();

As you understand, "List_Item_URL" is just example, you could add as many variables as needed this way. Not only with URL to listItem, but with any other data of listItem that taskItem might need to have in it.

After that it would be important to make sure task form displays those variables you added, the way you want. In case it is custom InfoPath form, you'd import it through ItemMetadata.xml with all fields listed as ows_fieldName and so on, but this is part of another story. Here is a good article on this:

share|improve this answer

Can you create a custom task contentType and add a link field in your custom task content type and populate the link that directs back to your original Item instead of creating 2 copies of the same item.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.