Apr 09 2009
SharePoint May Break Hyperlinks in Workflow Task Emails
I ran into an issue where hyperlinks in workflow task emails where being automatically changed by SharePoint from absolute hyperlinks to relative ones.
Scenario:
- You create a custom Visual Studio workflow and use the CreateTask activity.
- You set your SPWorkflowTaskProperties.Description property to some HTML text.
- In your Description HTML text, you have an html hyperlink <a> tag whose href=”” attribute contains an absolute hyperlink to a resource in the same SharePoint farm (i.e. a list item).
- Example: “Please review <a href=”http://yourserver/site/lists/yourlist/dispform.aspx?ID=1”>contract #12345</a>”.
Goal:
Users will receive the task email, and be able to click on the absolute URL in the email body to navigate to the SharePoint resource.
Problem:
It appears that SharePoint parses this HTML and readjusts the hyperlink and makes it relative.
Example: “Please review <a href=”/lists/yourlist/dispform.aspx?ID=1”>contract #12345</a>”
This effectively breaks the hyperlink in the email client.
The only workaround was to get rid of the <a> tag and write out the hyperlink in full. For example:
“Please review contract #12345 (http://yourserver/site/lists/yourlist/dispform.aspx?ID=1)”.
In this manner, SharePoint did not adjust the hyperlink at all.








July 27th, 2009 at 9:41 pm
I am also having the same problem. Do you have a solution for this?
January 27th, 2012 at 8:08 pm
The core of your writing is neat and works well with me. Somewhere throughout the sentences you actually managed to make me a believer. I still need more information and would rather have you to create more as soon as you can. If you accomplish that, I would certainly be fascinated. I will pop in again to review your updates!