Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: Using GetUserProfileByName to Fill Columns on a Data View Web Part with Defined User Name

$
0
0

I have a requirement that I prefill user information based on a field that is already filled out in the edit view of a Data View Web Part.

I'm grabbing the username right now with this:

$(document).ready(function () {var employeeUserIDvar = $('input[title="UserName"]').val();
});

What I need to do is then use GetUserProfileByName to go grab the different data elements of that user, and then fill other columns, like I can with SPGetCurrentUser and the established example code on this site for that.

All examples I find for GetUserProfileByName is just a bit too far over my head for me to engineer to work for my solution, so I was hoping someone here could help me with this?

So for example, if the field "UserName" equals domain\userid, then I call for userid's phone number, and do something like  $("input[Title='PhoneNumber']").val(userPhone);.

Can someone help me with a simple example of this with GetUserProfileByName so I can then add all the other elements I need on my own?

I very much appreciate any help, guidance, or assistance!


Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>