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
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.
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
Unfortunately, none of these options were providing the correct link. Indeed, these options are providing an incorrect path:
Encoded Absolute URL
Server Relative URL
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