Userprofileservice.asmx With .UDCX File Gives SharePoint Admin Username Instead of First name, Last Name and suchlike - InfoPath Dev
in

InfoPath Dev

Userprofileservice.asmx With .UDCX File Gives SharePoint Admin Username Instead of First name, Last Name and suchlike

Last post 06-14-2017 03:27 AM by chiransj. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 12-07-2016 03:18 AM

    Userprofileservice.asmx With .UDCX File Gives SharePoint Admin Username Instead of First name, Last Name and suchlike

    I have create an InfoPath form that uses the Userprofileservice.asmx web service to retrieve the information form the AD. I have used a .UDCX file store the data connection. My environment is SharePoint 2013 with InfoPath 2013. I wanted to view the First Name, Last Name and Preferred Name on in some text boxes. So I have used the below filters

    First Name - Value[Name = "FirstName"]
    Last Name - Value[Name = "LastName"]
    Preferred Name - Value[Name = "PreferredName"]

    The XPaths are as below.

    First Name - xdXDocument:GetDOM("GetUserProfileByName 2")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "FirstName"]

    Last Name - xdXDocument:GetDOM("GetUserProfileByName 2")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "LastName"]

    Preferred Name - xdXDocument:GetDOM("GetUserProfileByName 2")/dfs:myFields/dfs:dataFields/tns:GetUserProfileByNameResponse/tns:GetUserProfileByNameResult/tns:PropertyData/tns:Values/tns:ValueData/tns:Value[../../../tns:Name = "PreferredName"]

    This SharePoint site uses Claims based authentication.

    But when I published the form to SharePoint I get

    First Name - SPPrdAdmin
    Last name - EMPTY
    Preferred Name - SPPrdAdmin

    I cannot understand what I have done wrong.
    Please could someone help on this? Thanks and regards, Chiranthaka
  • 02-17-2017 08:57 AM In reply to

    Re: Userprofileservice.asmx With .UDCX File Gives SharePoint Admin Username Instead of First name, Last Name and suchlike

    Are you populating a username first via a field labeled something like User with a default value of userName()?
  • 06-14-2017 03:27 AM In reply to

    Re: Userprofileservice.asmx With .UDCX File Gives SharePoint Admin Username Instead of First name, Last Name and suchlike

    Yep. I am populating a field labeled like User with a default value of UserName(). Also I am the Site Collection Administrator. But I cannot access the 'Central Administration' section of the SharePoint Site. I don't have permission to access it.
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.