Sending email from Person Picker data using data connection - InfoPath Dev
in

InfoPath Dev

Sending email from Person Picker data using data connection

Last post 07-16-2015 06:06 PM by mattsky. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 07-15-2015 12:09 AM

    Sending email from Person Picker data using data connection

    Hi All

     Hoping someone can assist. I need to get the email address from the people picker function that is being used on my InfoPath form feeding into sp2013 'issue tracker' app.

    I have done a lot of googling but I cant find an answer that I can implement as I don't have the full server access most of the suggestions require.

     

    The end result of what I am wanting to do it send an email to the person whom is selected in the people picker. I cant do this in SP2013 as we aren't using a compatible version of MS exchange (2010) so I am limited to do it in InfoPath (or nintex but I haven't used that). I have got it working with a 'static' email address (being one I have entered manually and have it submitting through a data connection) but I don't know how to feed that field from the people picker.

     I am happy to add in some code if people can walk me through it.

     Any help is greatly appreciated.

    cheers

    Matt 

  • 07-15-2015 07:52 AM In reply to

    Re: Sending email from Person Picker data using data connection

     When you set up the email submit data connection, you can select a form field for the "To" value - have you tried setting that to the account id in the people picker? In some environments, I know that might not resolve to the email address, but it is worth a try, right?

    If that doesn't work, you can use the User Profile web service to get the email address for the user based on the account id in the people picker - but try my first suggestion and if that doesn't work, I can get you more details on other options. 

    Hilary Stoupa

  • 07-15-2015 04:26 PM In reply to

    Re: Sending email from Person Picker data using data connection

     Hi Hilary

     Those are great suggestions and will to give both a try. However I am not sure how to get the account ID from the people picker.

    I have seen a few ways of linking this in but as I don't have access admin access to the server that holds the people data (I work in a large organisation) my options are somewhat limited but I will give any of your suggestions a try!

    thanks 

  • 07-15-2015 04:38 PM In reply to

    Re: Sending email from Person Picker data using data connection

     In your form, you have a people picker control, right? In the data source, one field should be account id. See attached screenshot.


    Hilary Stoupa

  • 07-15-2015 05:26 PM In reply to

    Re: Sending email from Person Picker data using data connection

     Hi Hilary

     

    Yes I found it (still getting used to 2010 when I used 2007 before). so it comes up with the account ID but this isnt enough to send the email as it only displays salary ID and when I try to submit it puts up an error.

  • 07-16-2015 07:35 AM In reply to

    Re: Sending email from Person Picker data using data connection

     I'm sorry, I don't know what a salary ID is. Can you explain a bit more?

    The AccountID field from the people picker should have the users account ID. You could then set the query field in a GetUserProfile data connection to that value and query the data connection to get back details for the user, include the email address. More here: http://thinketg.com/using-infopath-and-the-web-service-getuserprofilebyname/ 

    Hilary Stoupa

  • 07-16-2015 06:06 PM In reply to

    Re: Sending email from Person Picker data using data connection

     Hi Hilary

     I don't have the correct access to do that type of query through our servers ( I work for a very large organisation of approx. 40,000 employees) so this sever access is near impossible to obtain.

    Obviously it has the linkages in there to retrieve the account ID/salary ID (same thing) but id am unable to change anything for them.

    Any of ideas? 

Page 1 of 1 (7 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.