Document URL from taskcontrol

Mar 31, 2009 at 12:06 PM
Hi,

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?

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

Chris
Coordinator
Apr 1, 2009 at 8: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.

Wouter

________________________________

Van: predeekc [mailto:notifications@codeplex.com]
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?

Chris

Read the full discussion online <http://wss3workflow.codeplex.com/Thread/View.aspx?ThreadId=51823&ANCHOR#Post174421> .

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 <http://www.codeplex.com/site/discussions/project/unsubscribe/wss3workflow> on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com
Apr 2, 2009 at 10: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 10: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. 

Regards,
Mike