How is browser form get E-Mail account from Active Directory? - InfoPath Dev
in

InfoPath Dev

How is browser form get E-Mail account from Active Directory?

Last post 01-23-2013 01:07 PM by Glen123. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 06-20-2008 05:04 AM

    How is browser form get E-Mail account from Active Directory?

    Hi all,

    I want to know, how is browser form get E-Mail account from Active Directory?

    Thank you very much.

    インフォパス ● デべロッパー
  • 06-20-2008 09:27 PM In reply to

    Re: How is browser form get E-Mail account from Active Directory?

    Hey There.

    If you know the userID, you can use a web service like Qdabra's to get the rest of their Active Directory record such as location, department, manager, and email.

  • 06-23-2008 10:34 PM In reply to

    Re: How is browser form get E-Mail account from Active Directory?

    Hi,

    Additionally, if I want other email in Active Directory by seletion in list. Has it another way?

    Thank you very much.

    インフォパス ● デべロッパー
  • 06-24-2008 08:53 AM In reply to

    • dlocc
    • Top 500 Contributor
    • Joined on 06-23-2008
    • San Diego
    • Posts 28

    Re: How is browser form get E-Mail account from Active Directory?

    Will this form be going on MOSS?

    Devin Walker
    http://www.dlocc.com
  • 06-25-2008 09:47 AM In reply to

    Re: How is browser form get E-Mail account from Active Directory?

    Yes, this form is going on MOSS.

    インフォパス ● デべロッパー
  • 06-25-2008 10:07 AM In reply to

    • dlocc
    • Top 500 Contributor
    • Joined on 06-23-2008
    • San Diego
    • Posts 28

    Re: How is browser form get E-Mail account from Active Directory?

    Ok, here's what I would recommend... let me know if this works for you:

    1. Within your form make a data connection to the UserProfileService MOSS web service:  

    • With InfoPath opened go to Tools > Data Connections, and click 'add...' to add a new data connection to the form. This opens up the Data Connection Wizard.
    • Select receive data from Web Service and click next.
    • Choose 'Web Service' and next.
    • Now you will have to point the wizard to the WS. Type an address similar to this: http://ServerName/_vti_bin/UserProfileService.asmx  and click next.
    • Here you get a list of all methods for that WS, choose GetUserProfileByName and click next.
    • In this screen you can specify what parameters are sent to the method, we are relying on the method's ability to return the current user name if no value is passed to it, so we will leave this as is (no value is passed to the method) and click next.
    • Click next and make sure 'Automatically retrieve data when form is opened' is checked.
    • Finish the wizard.

    2.  Follow these steps to add auto-populate a field with the form user's email address from Active Directory.  For more information please visit this blog post where I first learned this method: http://blogs.microsoft.co.il/blogs/itaysk/archive/2007/04/05/InfoPath-_2D00_-Get-the-current-user-without-writing-code.aspx 

    • Add a textbox to the form.
    • Go to the first textbox's properties (double click it).
    • In the 'Default Value' part, click the 'fx' button next to the 'Value' field. this opens up the formula builder dialog. 
    • Click 'Insert field or group'. 
    • In the data sources drop down, choose the GetUserProfileByName data source.
    • Expand all groups under the 'dataFields' group, and choose the 'value' field. Don't click OK yet!
    • With data 'value' field selected, click the 'Filter Data...' button and 'Add...'.
    • In the first drop down (value) select 'Select a field or group...' and choose the 'Name' field under the 'PropertyData' group.
    • Leave the middle drop down as is ('is equal to') and in the last drop down choose 'type a text...'.
    • This is the part where you specify which property to put in the textbox. As we said the method returns multiple properties about the user. For this textbox we want to put the user's work email in, so type 'WorkEmail' (this is case sensitive!). 
    • Click 'OK' for every open dialog box until you are back in the design mode.
      click 'Preview' and see the wonder!

    Let me know if this helps at all or if I'm way off base.

    Thanks,

    Devin Walker
    http://www.dlocc.com
  • 07-28-2008 11:46 PM In reply to

    Re: How is browser form get E-Mail account from Active Directory?

    Hi dlocc,

    Thank you very much for your answer. I follow your solution, it is Ok. But I have some another problem.

    There is error message "An error occurred accessing a data source." (there is not error number). 

    I noticed, if user's profile does not have value in field "User Name", such as "name.surname", on SharePoint profile, the error is occured.

    Otherwise, if user's profile has value in field "User Name", the error is not be occurred.

    Do you know about it?

    Thank you very much again.

    インフォパス ● デべロッパー
  • 01-23-2013 01:07 PM In reply to

    Re: How is browser form get E-Mail account from Active Directory?

    Thank you it works to retrieve the email automatically from the active directory. How about getting it's manager name and email add and user colleagues.

    thank you 

     

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