Submit InfoPath form and send SharePoint email with link
Watch this demo video of how you can submit an InfoPath form to a SharePoint form library, automatically generate a name for the form, and then send a link to the submitted form in an email via SharePoint 2013.
The following InfoPath 2013 with SharePoint 2013 video demonstrates how you can submit an InfoPath form to a SharePoint form library, autonumber the InfoPath form, and then send a link to the submitted InfoPath form in an email via SharePoint to one or more users that were selected from a people picker control on the InfoPath form.
This solution is based on a solution created in a previous InfoPath video tutorial about using InfoPath to send email in SharePoint 2013 and a previous InfoPath demo video about using a people picker to select email addresses for an email submit data connection.
Brief instructions to create the solution demonstrated below are available in the InfoPath 2013 Cookbook 2 Club.
InfoPath 2013 with SharePoint 2013 video tutorial transcript
Here I'm in SharePoint 2013, where I'm currently logged in as Jane Doe and where I've already published an InfoPath form template to this SharePoint form library. So if I click new document to add a new form, you'll see that as soon as the InfoPath form opens, it will resemble an InfoPath form that I created a couple of days ago in a video tutorial.
What that InfoPath form did was you could enter an email address here in a text box control, and then click Submit to submit a simple email message to the user using an email submit data connection in InfoPath. So no code or a workflow.
In this case, I changed the text box control into a people picker control, so the people picker control will be feeding email addresses to the email submit data connection. However, this solution in particular, is built on recipe 60 of InfoPath 2013 Cookbook 2, which submits an InfoPath form back to a SharePoint form library, and auto-generates a file name for it.
In this case, what I want to do is, I want to enter a name here, so for instance john.doe, and then enter a simple message. And then when I hit Submit, what I want is, the form will be submitted back to the form library with a new name, which will be auto-generated, and then that name will be used to construct a link that will be placed in the email and sent to John Doe, so that when John Doe clicks on the link in the email, he can open the InfoPath form in the browser.
So now that the form has been submitted to the SharePoint form library... You can see if I open it, it is the form that I just created. I can submit it again, but the second time that I submit it, it's not a new form anymore, it already exists in the form library, so a check will be performed, and then the form will be overwritten instead of a name newly generated to create a new form. As you can see we don't have a second form here.
So I'll go and check on the email now, and show you how that works...
So this is the message that was sent to John Doe, and as you can see it was submitted by Jane Doe, this is the message that I typed into the rich text box control, and this is the link that was generated for the InfoPath form. So if I click on this link now, it should open in the browser. And as you can see, this is exactly the form that I... you can see here it's Form_19... that I submitted back to the SharePoint form library.
See more InfoPath 2013 tutorial videos »
Copyright: This article may not be used on web sites (whether personal or otherwise), copied, disseminated, altered, printed, published, broadcasted, or reproduced in any way without an expressed written consent of S.Y.M. Wong-A-Ton. The techniques demonstrated in this article may be used within any Microsoft InfoPath project. This article is provided without any warranties. Copyright for this article is non-transferrable and remains with the author, S.Y.M. Wong-A-Ton.
Related InfoPath Articles:
- Create a SharePoint Designer workflow that sends an email with a link to an InfoPath browser form
- Send email via an InfoPath browser form in SharePoint
- Use a people picker with an email connection in InfoPath
- Programmatically submit an InfoPath form to a SharePoint library, send an email, and then close it
- Use an InfoPath form and SharePoint Designer workflow to send an email with attachments