3
votes

I have one custom list with fields like(IDs, Name, Phone no) . when i add a new item to the list a new item form will be opened. While filling the form by entering the first field( IDs), i want other fields to be auto-populated from active directory. Can it be possible through Browser(UI) or from sharepoint designer.

Please Help me out ...

3

3 Answers

1
votes

Yes this is possible I have implemented something very similar.But this is only possible through event receiver in a custom list.Following was my approach,

  1. Add a ItemAdding event receiver, only field entered by the user will be the UseraName field through people picker.

  2. Internally,fetch the details of the user entered from AD.This can be done through code in this way, http://www.aspdotnet-suresh.com/2011/03/how-to-get-userdetails-from-active.html

  3. Then you can assign the user properties to their respective columns and update the list item.

If its not a custom list,you can always use User Profile Synchronisation by Mapping additional required AD properties so that they will show up in the user information list of that sitecollection.

0
votes

You can use sharepoint user profile. So instead of going back to AD related stuffs SP profile will get automatically synced with AD. Its very easy to manage also.

0
votes

If it's a different AD than the one you use for user profiles, then you will need to develop a custom WebPart and write server code to connect to the AD and check for user's info & auto-populate them.

If it's the same AD used for user profiles, then you already have different users properties on the SharePoint side and no need to reach out to the AD... this is assuming that you already have a User Profile Service Application setup and it's synced with AD (as @samh above suggested).