This project is read-only.

Document URL from taskcontrol

Mar 31, 2009 at 1:06 PM

The controls are working brilliantly, but i'm unable to find how to get the URL of the document the workflow is running for.

Any ideas?

Apr 1, 2009 at 6:40 PM
Is this in a workflow or in a form?  If it's in a form, which form is it in?

Apr 1, 2009 at 9:29 PM
For tasks pages / controls you can use SPContext.Current.ListItem to retrieve the task itself.

For initiation pages / controls SPContext.Current.ListItem retrieves the item the workflow is operating on.

We should probably expose the item the workflow is operating on for task pages as well. I'll discuss adding it to V1.1 with Chris.



Van: predeekc []
Verzonden: wo 1-4-2009 19:40
Aan: Wouter van Vugt
Onderwerp: Re: Document URL from taskcontrol [wss3workflow:51823]

From: predeekc

Is this in a workflow or in a form? If it's in a form, which form is it in?


Read the full discussion online <> .

To add a post to this discussion, reply to this email ([email removed] <mailto:[email removed]?subject=[wss3workflow:51823]> )

To start a new discussion for this project, email [email removed]

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings <> on

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at
Apr 2, 2009 at 11:20 AM

Thanks for you're answer.

I now fixed this by creating an extended property from the workflow containing the URL.

Apr 15, 2009 at 11:38 PM
Hi Wouter and Chris,

Regarding exposing the list item to the workflow in the task page, is there a reason you wouldn't just use the SPWorkflowActivationProperties object in a task page?  It seems like that works to me, but then I'm still trying to figure this stuff out. For example, in your TPG.SharePoint.Workflow.Sample project, in the ChangeTaskOne_Invoked handler, I used WorkflowActivationProperties.Item to get the list item, and then walked up to the list itself to get the list title, which I logged to the history list along with the results of the task.