Sharepoint workflow emailed links to web-enabled forms not opening in browser.

Recently I discovered an issue with my monster change control form: the emailed links using the [Encoded Absolute Url] would load the form in infopath instead of in the browser like it’s meant to.

Sharepoint workflow emailed links to web-enabled forms not opening in browser.

So since sharepoint can’t provide a nice web-enabled link, we need to take some of the existing data, and some hard coded URL, and build a dynamic string.

This is how it is stuck together:

<A href=”{location}_layouts/FormServer.aspx?XmlLocation=/{location}{document library}[formname].xml&source={junk}“> link text </A>

Mine looks like this:

<A href=”″> [%change control:task summary%] </A>

You will notice there is a large amount of junk on the end which is very escaped, making it slightly difficult to generate by hand. Luckily there is a really easy way to do this!

Go to your form library and open any form, grab the entire URL and drop it into your favourite text editor.

In sharepoint designer, create an action to build a dynamic string. The first part of the string is the beginning HTML for the link, and the URL up until the form name. eg:

<A href=”
then insert the field ‘name’ like so

Then add the rest of the URL from the .xml onwards.

Now we need to close off the HTML for the link, so add a ">

Here we add the link text, you can use the field lookup of something like the form ‘name’ here or just some arbitrary text like ‘click’. I am using a field from the form called ‘task summary’ as my link text. Then close off the HTML with a </A>

This is the finished result, with green indicating HTML, yellow is inserted fields, and the rest is copied URL…

Now when this is sent to your recipents and they click the link, the browser will display the form instead of asking if you want to open it or save it.

Leave a Reply

Your email address will not be published.

Name *
Email *

Protected by WP Anti Spam