Click here to Skip to main content
14,364,088 members

SharePoint

 
GeneralRe: I can't find my custom WF Pin
Ingo27-Aug-12 6:18
memberIngo27-Aug-12 6:18 
AnswerRe: I can't find my custom WF Pin
Richard MacCutchan27-Aug-12 2:31
protectorRichard MacCutchan27-Aug-12 2:31 
GeneralRe: I can't find my custom WF Pin
AnTiiiKa27-Aug-12 3:49
memberAnTiiiKa27-Aug-12 3:49 
AnswerRe: I can't find my custom WF Pin
Andrija Juric29-Aug-12 3:10
memberAndrija Juric29-Aug-12 3:10 
QuestionUser Field type Pin
Aptiva Dave23-Aug-12 6:18
memberAptiva Dave23-Aug-12 6:18 
GeneralRe: User Field type Pin
Ingo23-Aug-12 22:11
memberIngo23-Aug-12 22:11 
GeneralRe: User Field type Pin
Aptiva Dave24-Aug-12 5:06
memberAptiva Dave24-Aug-12 5:06 
AnswerRe: User Field type Pin
Ingo25-Aug-12 1:58
memberIngo25-Aug-12 1:58 
Ok, next question is, if you have synchronized the user profile service with the ad.

If it is synchronized all data is there. You just habe to read it:

using (SPSite Site = new SPSite(“Site URL”)) {
  using (SPWeb Web = Site.OpenWeb()) {
    SPList UserInfoList = Web.Lists[“User Information List”];
    SPUser User = Web.Users.GetByID(1); – Put the User ID Here
    SPListItem UserItem = UserInfoList.GetItemById(User.ID);
    ...
  }
}


You can read the Department with:
UserItem[“Department”]


Afterwards you read the "Job title" for all the Users in the department (same way) and look up the head of the deparment. Perhaps it's not in the job title but in another field, depending on how the information in the ad is filled.

Well, so that how to do it with informations in the ad.
------------------------------
Author of Primary ROleplaying SysTem

How do I take my coffee? Black as midnight on a moonless night.
War doesn't determine who's right. War determines who's left.

GeneralRe: User Field type Pin
Aptiva Dave27-Aug-12 6:38
memberAptiva Dave27-Aug-12 6:38 
AnswerRe: User Field type Pin
Ingo27-Aug-12 22:42
memberIngo27-Aug-12 22:42 
GeneralRe: User Field type Pin
Aptiva Dave28-Aug-12 3:43
memberAptiva Dave28-Aug-12 3:43 
AnswerRe: User Field type Pin
Ingo28-Aug-12 4:02
memberIngo28-Aug-12 4:02 
GeneralRe: User Field type Pin
Aptiva Dave28-Aug-12 4:35
memberAptiva Dave28-Aug-12 4:35 
GeneralRe: User Field type Pin
Aptiva Dave27-Aug-12 6:39
memberAptiva Dave27-Aug-12 6:39 
GeneralRe: User Field type Pin
Aptiva Dave24-Aug-12 6:18
memberAptiva Dave24-Aug-12 6:18 
GeneralRe: User Field type Pin
Ingo25-Aug-12 1:50
memberIngo25-Aug-12 1:50 
AnswerRe: User Field type Pin
Ingo2-Sep-12 22:07
memberIngo2-Sep-12 22:07 
QuestionSharepoint designer encountered an error generating the task form! Pin
AnTiiiKa15-Aug-12 1:22
memberAnTiiiKa15-Aug-12 1:22 
AnswerRe: Sharepoint designer encountered an error generating the task form! Pin
Ingo26-Aug-12 23:17
memberIngo26-Aug-12 23:17 
GeneralRe: Sharepoint designer encountered an error generating the task form! Pin
AnTiiiKa27-Aug-12 1:10
memberAnTiiiKa27-Aug-12 1:10 
Questiondisplaying date only Pin
Aptiva Dave14-Aug-12 7:32
memberAptiva Dave14-Aug-12 7:32 
AnswerRe: displaying date only Pin
SPMatt22-Aug-12 12:07
memberSPMatt22-Aug-12 12:07 
GeneralRe: displaying date only Pin
Aptiva Dave22-Aug-12 12:10
memberAptiva Dave22-Aug-12 12:10 
AnswerRe: displaying date only Pin
Ingo26-Aug-12 23:00
memberIngo26-Aug-12 23:00 
GeneralRe: displaying date only Pin
Aptiva Dave27-Aug-12 6:38
memberAptiva Dave27-Aug-12 6:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.