Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

In my Infopath form 2010, I am using a data connection called Email submit (which is an 'To Email' option in data connection). I have a people picker field in my form template which is used to select a "manager" from my local database.

The problem is the user (who enters data in the form) can select any manager from database and after he clicks the submit button then an email should be sent to that specific manager with the 'print view' form of my infopath form.

The problem is I don't know how to send an email to that particular manager because in Email submit data connection we can see only 'To', bcc fields which asks us to enter manager email, which we don't know.

share|improve this question
    
Where are these managers being sourced from? Is the drop-down being filled from a SharePoint list? Is it statically set in the form? –  Drew Lanclos Nov 5 '12 at 19:08
add comment

2 Answers

When the user selects a manager from the drop down list, you have the name so cant you transform this into the email adres? Most of the times the email adres for a company is firstname.lastname@company.com.

If that doesn't work can you fill the drop down list with the email adresses of the managers instead of the names? Then you send the form to the entry in this field.

If that is not possible I think the only way to solve this is using custom code.

share|improve this answer
    
Given the user selection in the people picker, one should be able to supply that to a call to the User Profile Service to get the corresponding email address. Custom code should not be necessary. Much depends on what "database" refers to in the question. –  Drew Lanclos Nov 5 '12 at 19:07
add comment

You can maintain a custom list where you can enter the employee and manager details. The manager name would reside in a People/Group field created out of the box in form library. You can then populate the Manager field values in your InfoPath drop-down control.

You can write a simple workflow that triggers on form submit and sends email to this manager. The Account ID is enough to send email to that specific manager. This will be done through User Profile Service.. No worries. But remember to publish the Manager column to your form library.

The other way to get the specific manager name is through data connections where the details you can refer it here: http://path2sharepoint.wordpress.com/2011/07/24/get-manager-information-for-current-user-in-infopath-2010/

The final alternative would be to implement the business logic in code behind. Where the code behind can query your AD to retrieve the user/currently logged in user's manager name. By this you can also send the email to the retrieved manager via code.

Hope this helps... Thanks

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.