We recently put a rather complex SharePoint workflow into production. Our workflow is creates a lot of tasks, and each time a task is created a custom email is sent to that user with a link to the task. We create the body of this email ourselves, including the link to the task. The user clicks on the link and the task opens up in Internet Explorer and they can do whatever they need to do. We always want the forms to open in the browser and to begin with everything was peachy.
However after a few pilot users had been upgraded to Office 2010, which included the InfoPath client, it came to our attention that when they clicked on the link in the email it would open it up in the InfoPath client rather than opening it up in the browser. We would want the experience to be consistent so obviously this was not desirable.
Turns out the fix is fairly simple, if you know where to look. It took us some digging around but eventually we came across the following MSDN article: http://msdn.microsoft.com/en-us/library/ms772417(v=office.12).aspx
When we create the link we get the URL of the item by doing Item.Url and pasting that into the email. Looking at the documentation however the default way of opening the form will be using InfoPath. If the client is not installed it falls back to opening in the browser. That’s exactly what happened to us. Our users didn’t have InfoPath in the beginning so it would fall back to using the browser by default. Once they had InfoPath installed it started using that instead, because we never specified differently.
When forms were opened from SharePoint they opened in the browser because we have the “Display in web page” option set. That’s why the problem only manifested itself when opening the form from inside an email.
By appending ?OpenIn=Browser to the link, SharePoint will always open the form in the browser even though the InfoPath client is installed.
Leave a Reply