How to email a link to an item in a SharePoint Designer 2010 Workflow
I was creating a workflow, the details of which are not very important, but within it I have emails being sent out. Some of these are from/for Approvals and others are just using the send email action. I noticed in the emails that came from the Approval process, there was a link to get to the item. Looking at how this was generated really does not help much within the SharePoint Designer GUI.
Some of you may be saying, hey just use a lookup pointing to the URL Path like below:
Now if I have just this one lookup in my email, this is what my email looks like:
While this is showing me the path to that item, it is not really a link... of course I can make it a hyperlink instead which would give me the full URL, however, I usually get a IE 404 error page when click on the link. So how do we get around this?
First lets click the Hyperlink icon in the Define E-mail Message page in SharePoint Designer 2010.
You should then see the following screen, of which you are giving two fields to fill out, Text to display and Address. Text to display can be whatever you want it to display (this can be based off columns if you click the fx button). The Address is the more important field.
Click the fx button as in the above screenshot. This will open the Lookup for String window where you have two fields to set, Data source and Field from source. For Data source, choose Workflow Context. For Field from source, choose Current Item URL.
Click OK > OK > OK to get back to the drawing board of SharePoint Designer 2010. Publish your workflow when you are ready. Using the above Item URL, my email now looks like the following:
Clicking this will open the view item page for said item. The only (slight) issue is that this method will not open in the same modal window you may be used to. Instead it will be the whole page:
IncWorx Consulting is a leading Microsoft Gold Partner focusing on SharePoint Consulting, SharePoint Support, and SharePoint Application Development.