none
SharePoint 2013 visual studio workflow: Getting current item url and created task URL RRS feed

  • Question

  • I am working on custom approval workflow using visual studio and I need to get get the current item url and the url of the task created for the respective user/group so that I can share the same through email which gets triggred at the time of task creation using this workflow.

    There is one activity 'WebUri' which give web URL but could not find anything for current item url and task url.

    Please suggest.

    Thanks!

    Monday, March 6, 2017 8:59 AM

Answers

  • I found the solution for this. We Can get the current item url using 'LookupWorkflowContextProperty' activity and selecting 'Current Item URL' from PropertyName DropDown:

    For Task url, we can construct the same like below:

    WebUrl+"Lists/TaskListName/DispForm.aspx?ID="+TaskId

    here you can get the WebUrl using activity 'Weburi' and get the TaskId from the outcome of 'SingleTask' activity as below:

    Hope this helps others!

    Thanks!

    • Marked as answer by Ashish_H Wednesday, March 8, 2017 10:21 AM
    Wednesday, March 8, 2017 10:21 AM

All replies

  • I found the solution for this. We Can get the current item url using 'LookupWorkflowContextProperty' activity and selecting 'Current Item URL' from PropertyName DropDown:

    For Task url, we can construct the same like below:

    WebUrl+"Lists/TaskListName/DispForm.aspx?ID="+TaskId

    here you can get the WebUrl using activity 'Weburi' and get the TaskId from the outcome of 'SingleTask' activity as below:

    Hope this helps others!

    Thanks!

    • Marked as answer by Ashish_H Wednesday, March 8, 2017 10:21 AM
    Wednesday, March 8, 2017 10:21 AM
  • Hi,

    Thanks for posting answer, it will help others who stuck with the same issue in the forum.

    Best Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, March 9, 2017 2:13 AM