This project has moved and is read-only. For the latest updates, please go here.

Question Regarding SPGetCurrentUser

Jan 2, 2013 at 7:22 PM

I'm working on a site where a form might be filled out on behalf of the manager of an employee, by say a supervisor. The form however, required Employee's manager information be filled out regardless of who submitted it.

This would be an easy nut to crack if I knew for a fact that only the manager would fill the form out and could use SPGetCurrentUser to prefill the current user's data, but in the case where a supervisor is filling out the form, I'd like to have the following scenario:

Supervisor (or manager) enters the MANAGER's user ID and clicks a "Fetch Information" (or something) button. We then use SPServices to go fetch the relevant profile information and prefill the fields in the form based on that User ID.

How can I do this with SPServices? How do I set a variable so that SPGetCurrentUser is really looking up the user information of the user specified in the "Manager's User ID" field?

Thanks for any assistance or insight!