14

I am customizing the Email task notification message body in SharePoint Designer and need to include a link to the task. I can get all the pieces of the url except the task list id. I have:

[%Task Process:Web URL %]/_layouts/WrkTaskIP.aspxList=**?????**&ID=[%Current Task:ID%]

I've tried:

Field Data to Retrieve

Data Source: Association: Task List

Field from source: ID

Find the List Item

Field: Workflow Item ID

Value: Current Item:ID

which evaluates to an integer, not a GUID.

I also tried, Field from source: GUID, which did not evaluate to the ID of the task list.

Is there any way I can obtain the ID of the task list? I prefer not to hardcode the guid, since this workflow will be exported/imported when I promote it to production.

  • Thanks. I just did. Since I'm a new user the system made me wait 8 hours to post an answer to my own question. – Laurie Apr 27 '11 at 15:58
  • does NOT work in my workflow Tasks. just takes me to top level site. very frustrating. i can't find anything that works. – April Drake May 2 '13 at 1:33
15

It turns out that SharePoint Designer provides the entire URL to the task, exactly what I need:

[%Current Task:Form_URN%]
  • This field is blank for me. – Nacht Dec 21 '16 at 4:39
  • 1
    And I just found out why it was blank - I was trying to use this field in the "Before a Task is assigned" portion of the workflow. I moved my email action to the "When a Task is Pending" portion of the workflow and it had the correct value. – Nacht Dec 22 '16 at 3:50
1

The answer here did not work for me. The url that this code should generate doesn't show in the body of the email:

[%Current Task:Form_URN%]

I've also tried: [%Workflow Tasks:Form_URN%]

Both of these tags show nothing in the email body. I can get to the link if I hit the "Open this task..." button, but unfortunately it's not intuitive to the user. The 3 users I had test the workflow all came back and said they didn't see a place to approve the task. I then had to send a screenshot highlighting where the "Open this task.." button was. Doesn't MS test this stuff to make sure it's easy for the user? Why would they place the button at the top of the email where the user overlooks it as it looks like part of the UI.

  • You have to add the [Current Task:Form_URN%] into a link instead of adding it directly into the email body. So for example you would add a link with "Click here to approve/reject" as the link text and the [Current Task:Form_URN%] as the link location. – Peter-Ross Cuthbert Oct 29 '15 at 7:24
  • I actually ended up setting a separate workflow on the task list and then using the "_layouts/15/WrkTaskIP.aspx?List={guiid}&ID=[%Current Item:ID%]" link within the email. – Casey Govero Oct 17 '16 at 18:54
0

There is an easier workaround to send the user directly to the edit form, use a redirecting display form with some simple JavaScript: https://www.dmcinfo.com/latest-thinking/blog/id/8674/always-open-sharepoint-2013-tasks-in-edit-mode

I spent ages looking for a way to get the taskID so I could send the approver directly to the form but there is no way to do it, this is the best workaround i've seen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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