User Profile Information

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Jdubs
Posts: 73
Joined: Fri Dec 19, 2014

21 Apr 2015

I'm not able to deduce how to get the User Profile information via the instructions in the following thread: viewtopic.php?f=1&t=434

Is it possible to post the code for retrieving a user's Department and Manager? (That's essentially what I need.)


I have the following code to get Current User: can I re-use this code in any way and just replace some words to get Department and Manager?


// Load current user login

SP.SOD.executeOrDelayUntilScriptLoaded((function () {

var ctx = new SP.ClientContext.get_current();

var web = ctx.get_web();

ctx.load(web);

var user = web.get_currentUser();

user.retrieve();

ctx.executeQueryAsync(

function () {

// Set user login

fd.field('AssignedTo').control().value(user.get_loginName());

// Run validation by emulating validation image click

fd.field('AssignedTo').control()._el().find('a:eq(0)').click();

});


}), "SP.js");

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

22 Apr 2015

Hi,

Please, find a lot of samples on how to retrieve user profile properties in the following post:

http://www.vrdmn.com/2013/02/sharepoint ... -user.html

If it doesn't help, we can assist you in configuring the case directly on your server via TeamViewer. It will take 100 support minutes.

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests