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

The problem is the following: I need to create a workflow using sharepoint designer, which will create tasks for chosen users and after, will send them email notifications, where every email will contain url of the corresponding task edit form. I made this functionality using "Task process" workflow activity. In this activity there is a way to put task view form URL in emails([%Current Task:URL%]), but how to get edit form url or at lest how to get task id in sharepoint designer I couldn`t find.

Any ideas? Is there a way to insert task edit form URL to notification emails without coding?

share|improve this question

Not sure if anyone's paying attention to this question anymore, but I just had the same issue. I had been using the "Start a Task Process" activity in the workflow, but I wanted to link the user directly to the edit page. Normally, the email contains a link to the view properties page for the task (i.e., the [%Task:URL%] variable). But then users need to know enough about what's going on to click the edit task link somewhere and then finally approve or reject.

Instead of using the "Start a Task Process" activity, use the "Assign a Task" activity. That will provide the ID of the created task and allow you to construct the URL of the edit page using that ID (which will be a standard workflow variable, accessible from anywhere in the workflow once the task is created), e.g., set your hyperlink target in the string builder to something like

share|improve this answer

I have the same problem. I ended up with a solution where I insert a link to the dispform, but suffixed with &linkfromemail=true. On the dispform page I have a hidden content editor web part, where source is edited to contain the following javascript, which forwards to editform:

function qsSearchInUrlString(key) {
 key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
 var match = RegExp("[?&]"+key+"=([^&]+)(&|$)"));
 return match && match[1].replace(/\+/g, " ");

if (qsSearchInUrlString("linkfrommail")!=null) {
 var theId = qsSearchInUrlString("ID"); 

 var infix = "/Opgaver/DispForm.aspx";//this relative path for the task library and dispform.
 var indexOfInfix = location.href.indexOf(infix) +  1; 
 var editUrl = location.href.substring(0, indexOfInfix) + "Opgaver/EditForm.aspx?ID=";
 var newUrl = editUrl + theId; 
 location = newUrl;
</script> ​​​​
share|improve this answer

If you look at the Task list which you are storing the task then you can get the URL of the EDIT form and then add that into your workflow with the required (task) ID.

So in effect the URL of the form is hard-coded in the email but has the variable of the TaskID attached to it.


share|improve this answer
Yap, but there is still a problem - how to set taskID variable. In Task Properties picklist there is no such a variable. – Vahagn Nahapetyan Mar 18 '13 at 12:49
I thought you were using %Current Task:ID%? – Stephen Mar 18 '13 at 12:55
I would like to use it, but it is not available in the list of available fields. Screenshot - – Vahagn Nahapetyan Mar 18 '13 at 13:04
And there is one more property - "Task Assignee". – Vahagn Nahapetyan Mar 18 '13 at 13:07
Just fixed question, there mus be URL, not ID. ID is giving exception in SharePoint. I tried to write it manually before. – Vahagn Nahapetyan Mar 18 '13 at 13:12

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.