GetUserProfileByName doesn't populate userinfo fields at Form loading - InfoPath Dev
in

InfoPath Dev

GetUserProfileByName doesn't populate userinfo fields at Form loading

Last post 10-17-2015 07:31 PM by Himanshu_Saxena. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-07-2015 07:11 PM

    GetUserProfileByName doesn't populate userinfo fields at Form loading

     We have a requirement to prepopulate userinfo fields when the form loads and when the GetInfo button is clicked.

    We use GetUserProfileByName web service to retrieve userinfo fields, such as EmailAddress, Department, Division, Phone Number.

    At Infopath Designer preview,  all the userinfo fields are populated as expected. Then I published the Infopath form to the Form Library.

    At browser, the formload only populate logon user's name at the name picker field. Selected a different user and clicked on GetInfo button doesn't populate userinfo fields as well.

     I have checked with a colleague but she uses custom list mostly. She didn't run into this issue.

     

    What is happening here?  The Infopath template is published to a Form library.

    Does the permisison need to be elevated to Full Control to use the GetUserProfileByName webservice with Form library?

    Currently the by default permisison is checked.  

    Please help and much appreciated!!  

     

     

  • 09-17-2015 04:36 PM In reply to

    Re: GetUserProfileByName doesn't populate userinfo fields at Form loading

    Hello MWAN001,

    What versions of SharePoint and InfoPath are you using? Here's a post for O365 but it's very similar for 2013. http://www.infopathdev.com/blogs/bre_huston/archive/2015/02/12/user-profile-service-in-o365.aspx

    Hope that helps!
    Bre

  • 10-17-2015 07:31 PM In reply to

    Re: GetUserProfileByName doesn't populate userinfo fields at Form loading

    Hi, As per my understanding you are pulling multiple information using on the InfoPath form using the GetUserprofileByName web service. While doing preview it pulls up all the value correctly but while opening in browser it pulls the user's name only. I can't give you a definitive answer on this as every thing is working fine in the Preview but still you can check the below settings. 1. Make sure the user login name you are pulling using the web service not using the function Username(). This can cause some confusion some time. 2. All the informations are being pulled from UPA so make sure you have the information from SharePoint Central Admin. ( Just wanted to cross check as it works in preview). 3. Are you pulling the whole data on the form load or only login and expecting the rest information based on that if this is the case check the post back setting of the field, where you are pulling the login name of the user.
    Himanshu Saxena
    MSFT
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.