Thursday, 11 July 2013

sharepoint designer workflow email link to list

Most of the workflow end users requirement is, there should be a link to review the workflow item in  their email.
I am just sharing a quick tip to send an email to a sharepoint Item by adding hyperlink to the message body

1.       Add a “Send an Email” action to your workflow. Edit the action to pull up the email configuration dialog.
2.       Select the text and click the “Add hyperlink” button seen below.
When prompted for the address of the link click the string builder button to add the URL

  3.   In SharePoint, go to the form library where your InfoPath forms are stored, and click an existing  InfoPath form to open it in the browser.
  4.   Copy the URL of the InfoPath form. The URL could resemble the following:

http://ServerName/SiteName/_layouts/FormServer.aspx?XmlLocation=/SiteName/LibraryName/Form1.xml&Source=http%3A%2F%2FServerName%2FSiteName%2FLibraryName%2FForms%2FAllItems%2Easpx&DefaultItemOpen=1
 
where ServerName is the name of the SharePoint server, SiteName is the name of the SharePoint site, LibraryName is the name of the SharePoint form library, and Form1.xml is the name of an InfoPath form 
Copy the URL and paste in the string builder window .Remove the shaded portion after
http://ServerName/SiteName/_layouts/FormServer.aspx?XmlLocation=
 
Instead of that add a lookup [%Current Item:Encoded absolute URL%]  as shown below

5. click OK and publish workflow

Now whenever you create a new InfoPath form and save it to the form library, the SharePoint Designer workflow is started, and an email is sent to the recipients you specified for the email in the SharePoint workflow. When a user opens the email and clicks on the link in the email, the InfoPath form opens in the browser.