Skip to content

Add a link to a list item in a SharePoint Designer Workflow Email

01/21/2015

Something that seems like it would be easy and obvious is, in a SharePoint Designer Workflow, adding a link to a list item in an email. Turns out that it’s not immediately obvious . There are a couple of places this info can be found on the internet, but not very easily, so I’m posting this in case it helps others and definitely so that I can find it again 😉

First off, if you’re adding a link to the current workflow item, then the answer is actually easy as long as you know to look for it.  From inside the Email builder, click “Add or Change Lookup”, select “Workflow Context” and “Current Item URL”. This link will work assuming that you want to link to the current item.

wf1

However if you’re creating a link to a list item other than the current workflow item then there are a number of fields that *look* like they would provide a link to the list item, but actually don’t. I’ve added a bunch of them to the email builder below, and notice, none of them actually return what we need.

wf2

wf3

The actual URL to my list item is http://myportal/Lists/test/DispForm.aspx?ID=1 so none of these will actually get you there.

In this scenario one method to get your url is to use the Current Site URL field from the Workflow Context data source then type the list name and finally add the list ID at the end. Depending on the logic of your workflow there are many different ways you could determine the correct list ID. For this example, I just have a variable that stores the ID called MyListID.

wf4

wf5

And that gets me the URL I need in my email

wf6

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: