Monday, July 11, 2016

Issue with Email address/Sending Email in Infopath Form

If the user tried to send an email through the Send Email Data Connection, where we specify the To/CC field mapped to a 'DisplayName' from the person or group field in the InfoPath Form.

It works most of the time, but I have seen there are some users whose email address is not resolved and so it always throws error that its not able to find the email address of that user.

This issue occurs if the user has an account in more than one domain, then they get this error message. User who have only one account in intranet domain, their account name resolves and email is sent.

Please check the below blogs talking about the same issue.

https://support.microsoft.com/en-us/kb/968479

http://answers.microsoft.com/en-us/ie/forum/ie11-iewindows8_1/the-form-cannot-be-submitted-because-some-of-the/549e5d02-3402-4209-a3ed-ca82ef3a4805?auth=1

To resolve this issue, get the email address of the user from the person or group field using user profile service and give that email address field in the Send Email Data Connection.


Name of the Requestor Email Address text box is C070EmailAddress.

Name of the Requestor people picker field is C070Group

For the "Get Email" button, add the rules as shown below.

Here the first action is Set a Field's value.
Here the AccountName is from the User Profile web service data connection.

 
 
And here the "AccountId" is the AccountId from the C070Group people picker field.
 
 
 
Next action is "Query for Data" and here select the "GetUserProfileByName" data connection.
 
 
 
Next action is a Set Field's value. Here Set the "C070EmailAddress" text box field value with the WorkEmail which got retrieved from the user profile web serivce data connection.
 
 
 
Here is the step on how to get the value of the WorkEmail for that user.
 

 

 
Then save the rule. When you preview the form, if you enter the user in the people picker box (C070Group), and click on button "Get Email", then it will retrieve the email address for the entered user from the user profile.

 

No comments:

Post a Comment