Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Is it possible to retrieve the name of a user's manager using SPServices if the userID is entered?

Ie: Either using a people picker field or a text field ("txtUserID) the userID is entered.

Upon clicking the Resolve Name button or pressing enter the Full Name is resolved in txtUserID and the associated Manager's name is populated in "txtManagerName"?

share|improve this question

3 Answers 3

When you say UserID, I think you probably mean the account since you mention a People Picker. Using the new SPFindPeoplePicker function in SPServices v0.7.2, you can get the dictionary entry for the user. That contains the account, which you can then use in a call to the User Profile Service to get the user's manager, if available.

share|improve this answer

You could create a custom control that takes a UserID, passes it to the User Profile Service web service, and return the user's manager. That's not something you'd be able to just do out of the box with a people picker though.

share|improve this answer

My experience is that the Manager lookup is only available in the context of a workflow.

You'll need to have User Profile Synchronization configured, then you could create a basic workflow on add/edit of the item to retrieve and update the manager field.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.