SharePoint Designer 2010 Workflow Email Link To Item

<Update: 2015-06-15> My colleague Joe Rodgers pointed out that the below steps do not work in SharePoint 2013 style workflows.  As it turns out there was an issue with the link that was generated for the “Workflow Context: Current Item Url”.  This issue is addressed in the SharePoint  2013 June 2014 CU (requires Service Pack 1 or the March 2013 PU).  See below for more details.

</Update>

In this post I’ll walk you through the process of sending an email that contains a link to the current item from a SharePoint Designer 2010 workflow.  This is a process that has been published on many other forums and blogs, but many that I have seen are more complex than seems necessary.

 

Problem

A common request from SharePoint users is to get an email which contains a link to review/approve/edit the workflow item.  SharePoint list items contain an automatic property for Url Path, but unfortunately that Url is not properly formatted to retrieve the item if you include it directly on the message body.  I tried a few solutions suggested from other blogs or forums that took a substring of the Url Path property, concatenated the display form view Url, and mixed in some other strings.  While I was able to get this working in some scenarios I still had issues in general.

 

Solution

My solution involved adding a hyperlink to the message body.  This ended up being far easier than I had expected and fairly intuitive once I found the correct property to use.  Follow these steps to see what I did.

First add a “Send an Email” action to your workflow.  Edit the action to pull up the email configuration dialog.  Click the “Add hyperlink” button seen below.

EmailLink1

When prompted for the address of the link click the fx button to perform a lookup.  Choose Workflow Context from the “data source” dropdown.  Choose Current Item URL from the “field from source” dropdown.  Click OK.

EmailLink2

Your Edit Hyperlink dialog should now look something like this.

EmailLink3

The end result will be a hyperlink added to your email pointing to the current workflow item.  Note: this link points to the non-modal dialog display form (display form similar to what you had in 2007).

EmailLink4

 

SharePoint 2013 Considerations (update 2015-06-15)

If you attempt to use this process for SharePoint 2013 style workflows (based on Workflow Manager and not the out of the box SharePoint 2010 workflow engine) you will notice that the URL generated is incorrect (ex. “Lists/MyList/1_.00”).  It will look something like the following.

EmailLinkWFItem2013_3_thumb[1]

 

The solution to this is to install the SharePoint 2013 June 2014 CU (I tested with the Server package but it may be included in the Foundation package as well).  After you install this cumulative update you may notice that the URL generated only includes from the list level and down (ex. “LIsts/MyList/DispForm.aspx?ID=1).  As such you will need to combine this with the site URL.  See below for example of the new URL that is generated.

EmailLinkWFItem2013_4_thumb

 

Conclusion

In this post I walked you through the steps to create a SharePoint Designer 2010 workflow with an email that contains a link to the current item.  While there are many other options for accomplishing this out on the web I found this to be a more concise process and easy to understand.  Hopefully you found this helpful as well.  Feel free to leave any comments or feedback if you’ve found other ways that were helpful to you.

 

-Frog Out

114 thoughts on “SharePoint Designer 2010 Workflow Email Link To Item

  1. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#615114Thanks so much for this, it has been so helpful – I was able to build a workflow email in Designer to take the emai lrecipient to a discussion needing managerial attention. Wondering if you can tell me how to link to a threaded view of a discussion item instead of the original view of the discussion? In that way the manager will see all the replies and not just the original posted discussion. Thanks!

    Like

  2. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#615767BeI don’t see the subsite name as a field you can choose. A few options. You could name the list after the subsite (ex. “Subsite A Expense Reports”) and then include the list name in email. Also could grab the URL and parse out the site url from that (assuming url and title are similar enough). Other than that don’t know what you could bind to.Jennifer,I haven’t tested this much with discussion lists. The problem is that they don’t follow the convention of using IDs in the URL but instead FolderIDs. You want to use the Threaded.aspx page but I’m unsure how to retrieve the folder ID using SharePoint Designer.Kiran,I recommend users to build lists, sites, etc. with no spaces in the names. Afterwards rename the title to include spaces. This (usually) helps avoid issues like you are experiencing but also helps developers with the underlying naming they need to use.

    Like

  3. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#619497Very helpful.Can i ask you a another sharepoint question?I am trying to create a reuseable workflow that when you select the “current item” the name column is available? It the name column exists when i create a list workflow but not reuseable workflow. It allows me to select the title field but we don’t fill in that field. I need to get the name of the current item essentially.

    Like

  4. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#619809Hanna,When you use a reusable workflow SharePoint Designer is associating it to a content type of sorts, not to the list specifically, so you won’t see all of the columns. If you use a list workflow you are associating directly to the list so you have access to all of the columns. If you are not using the Title field for other purposes you could rename the Title column to Name and work with it in a reusable workflow.

    Like

  5. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#622240I have spend countless hours in both 2007 and 2010 Sharepoint workflow trying to combine a hard coded text url srting with a “current item” workflow value and have the whole string be a hotlink. This, at least for 2010 Sharepoint, has solved my issue. Thanks so much for opening my eyes to a solution that was right in front of my face.

    Like

  6. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#630630I did exactly what was stated and it just wouldn’t work. I messed with it and came up with a different solution.a. Upload document to document library in SharePointb. Click the “Edit HyperLink”c. Text to Display: Enter Title of document you are creating the link for.d.Press EDIT to search for the folder where the document is.e. Double click the Folder and select the document. f. Address will now be populated with the URL to the document. [OK]g. The link is now in the email. h. Check for ERRORS and PUBLISH.i. Test

    Like

  7. Originally posted on: https://briantjackett.com/archive/2011/02/18/sharepoint-designer-2010-email-link-to-item.aspx#632642Thanks for this “tutorial”. You revealed two really obvious items that I had not seen previously and they solved my problem of getting a link to be a link.One change I did make is NOT selecting Current Item URL because when I used that to open my newly posted document InfoPath was opened on my local machine to display the document. So instead I entered the URL of the top level of the library in the Address field where the new document was posted. This opened SharePoint right at the library and the new document was only a double-click away.Thanks again. Your “tutorial” works where several others only almost work.

    Like

Leave a reply to Kiran Kumar Reddy Cancel reply