This is the third installment in a series about the building permit application, an end-to-end solution built entirely with the 2007 Microsoft Office release. The previous post described the implementation of user role functionality. This post focuses on InfoPath e-mail attachments.
In the end-to-end solution, the applicant submits an InfoPath form file to a SharePoint document library, which then triggers a SharePoint Designer workflow that is associated with the library. The workflow updates values in the form file and sends an e-mail message to the compliance reviewer indicating that an application is ready for processing. Meanwhile, the form uses an e-mail data connection to send a snapshot of the current view to the applicant. This message provides the applicant with a record of what was submitted, as shown in the following figure:
The e-mail data connection in this solution is set up much like an e-mail data connection would be for an InfoPath 2003 form template. Form field values can be used in the To, Cc, Bcc, and Subject lines, and the message body can be customized as needed. However, new to InfoPath 2007 is the ability to set attachment options for the e-mail message. In the case of the building permit application solution, it is likely that applicants will not have the InfoPath 2007 client installed on their machines. Thus, the option to send only the active view of the form (with no attachment) is set, as shown in the following figure:
Then, a submit rule is added to ensure that the e-mail data connection is used only when the applicant submits the form file. You might recall from the previous post that a RoleID node value of 1 means the applicant is the current user. So, the submit rule would appear as shown in the following figure:
All other automated e-mail messages for the building permit application solution are sent as a result of the SharePoint Designer workflow. In my next post about this solution, I will explain how the workflow evaluates form data and performs actions, such as sending e-mail messages.