1

I am targeting a Person/Group field within my page layout via JavaScript. This enables me to get the display name for that particular user "Lastname, Firstname".

Using '.innerHTML', I can also retrieve the email address for that user. I am wondering if I can use the "Lastname, Firstname" to lookup that particular user's account name for use elsewhere.

I have already found examples of where I can lookup various user profile properties given that my input is the account name. However I don't have this available to me and this is the property I need to retrieve.

1 Answer 1

1

Use SPServices for this. You can pass the lastname / first name and get the user object using which you can fetch user properties. See: http://spservices.codeplex.com/wikipage?title=SearchPrincipals

1
  • Thanks, I ended up using the code in the link you provided (SP Services - Search Principals). Worked with some change. Commented Jul 28, 2015 at 15:30

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.