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

hoping someone can assist with my current problem. I've been Googling for a solution for the past few days but haven't found anything yet that is close to what I need.

My scenario

The HR Department has requested for an application to track staff hire/termination transfer. To cater for this a new custom list is created to hold the applicable data. One of the fields in this list will store the login id of the user for an external application. The value of the login id is stored in AD and synced to the User Profile. This synchronization is working well. All this is on a SharePoint 2010 server.

My question is, what is the best way to retrieve the value from the user profile and update the custom list with the login id?

My idea is to do a query to the User Profile based on the user employee id and update accordingly. Can this be done? If it's possible can someone guide me on how to do it? I'm sure there's a straightforward solution to this but being a SharePoint noob I can't get my head around it.

share|improve this question
add comment

2 Answers

You could also write a timer job that periodically looked at the User Profile Change Log and determined if specific values that you are watching changed. It is more performant in most cases.

share|improve this answer
add comment

You need to get a UserProfileManager (Sample at link) then either call GetUserProfile and retrieve properties from that or call GetStringSinglePropertyValueForUser if you only need a single property

share|improve this answer
add comment

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.