Custom E-Mail Event for Sharepoint Upon InfoPath F

2019-07-22 14:34发布

问题:

A customer wants an e-mail notification sent to a select group of people when a new InfoPath form is submitted to a particular Document Library on their SharePoint 2007 setup.

Easy, right? Use a custom set of rules for an e-mail submission in InfoPath, plop in the addresses, use a fancy equation to construct a useful e-mail subject line... and done. Worked like a charm. Problem solved in just a few minutes...

However, the customer doesn't want the whole form e-mailed out or even attached to the e-mail. They only want a few select fields from the form in a very simple message.

I've tried writing an ItemAdded event handler from the SPItemEventReceiver base class, but it doesn't seem to do anything. Yes, I added the event handler to the GAC and created a Feature.xml and Elements.xml to register the event handler with SharePoint. But, I'm not sure if this is even the right event to customize. Is an item in a Document Library the same as an item in a List?

Has anyone had luck doing a similar e-mail notification event? Is there an easier way to accomplish what I'm attempting? Perhaps there's a way to do this easily through the SharePoint interface or edit the contents of the e-mail submission rule to be a simplified version of the form?

Any advice is greatly appreciated!

回答1:

How about a very simple SharePoint Designer workflow that is triggered when the form is uploaded. From there you send an email and include content of the (exported) columns in an email body.



回答2:

This article has a good way to do this, but it starts about halfway down. Ignore the first half of the article as it is very confusing and misleading. Start where it says, "Basically, instead of e-mailing a custom view, we'll e-mail custom view content."

http://blogs.msdn.com/b/infopath/archive/2007/01/17/emailing-a-custom-view.aspx