‘Related List item’ doesn’t open browser enabled infopath form in SPDWorkflow

During editing tasks in SharePoint designer workflow for the form library, there is an option ‘Related List Item’. It will open form as an xml or asking to save it, not as a browser compatible infopath form.
we will use Query Parameters to Invoke Browser-Enabled InfoPath Forms

Suppose your form URL is
http://ServerName/sites/SiteCollection/FormLibrary/Form1.xml
If we write
http://ServerName/sites/SiteCollection/FormLibrary/Form1.xml?OpenIn=Browser
then it will automatically go to following link which is browser enabled infopath form
http://ServerName/sites/SiteCollection/_layouts/FormServer.aspx?XmlLocation=~sitecollection/FormLibrary/Form1.xml&OpenIn=Browser

To do this, open task page in sharepoint designer and search “Related list item:”, you will get
<td class="ms-formlabel" valign="top" nowrap="true" width="25%"><b>Related list item:</b></td><td class="ms-formbody" valign="top" width="75%"><a href="{substring-before(@WorkflowLink, ', ')}"><xsl:value-of select="substring-after(@WorkflowLink, ', ')"></xsl:value-of></a></td>

Replace
href="{substring-before(@WorkflowLink, ', ')}"
to
href="{substring-before(@WorkflowLink,',')}?OpenIn=Browser"

If you want to send form link in the email then do following to make link browser enabled infopath
Click “Add Lookup to Body” in “send to mail” action in SharePoint designer workflow, Select “Current Item” as source and “Encoded Absolute URL” as Field and put “?OpenIn=Browser” just after it.

See following link for more detail to use Query Parameters to Invoke Browser-Enabled InfoPath Forms
http://msdn.microsoft.com/en-us/library/ms772417.aspx

2 comments:

  1. this works good for "Related list item", thanks for that. But How would I Add this parameter while seeing the tasks page (Link column)?

    ReplyDelete
  2. I tried this solution and it didn't work - the link does not display the OpenIn=Browser code in the workflow email, and the form still opens in the InfoPath client (or tries to). I followed the syntax exactly.
    Also, good question from PaLa about the Task list. Any other ideas here?

    ReplyDelete