SharePoint 2010 – Send the URL of the current item with a workflow using SharePoint Designer

I know the best practices to develop a workflow is to use Visual Studio and deploy it within a solution.

But sometime, it’s better (and simpler) to use SharePoint Designer Smile

In this case, I wanted to send an specific formatted email to some users (the item creator and 2 administrators) when an item is created and/or updated.

In this email, apart of other details, I wanted to provided the link to the new item.

So I opened SharePoint Designer and start creating the workflow associated to the list.

image

image

As there is some Field from source related to current item URL I start using it

  • Encoded Absolute URL – this one should be the one to use
  • Server Relative URL
  • URL Path

image

Unfortunately, none of these options were providing the correct link. Indeed, these options are providing an incorrect path:

Encoded Absolute URL

http://webappurl/Lists/Demo/1_.000

Server Relative URL

/Lists/Demo/1_.000

URL Path

/Lists/Demo/1_.000

 

As you can see, the item URL is composed by an ID while it should be http://webappurl/Lists/Demo/dispform.aspx?id=<item ID>

So, to obtain the correct item URL, you must use the following Lookup

  • Data source: Workflow Context
  • Field from source: Current Item URL

image

Leave a Comment

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.