Click here to Skip to main content
11,433,170 members (60,687 online)

Sharepoint

 
GeneralRe: I can't find my custom WF Pin
ihoecken27-Aug-12 6:18
memberihoecken27-Aug-12 6:18 
AnswerRe: I can't find my custom WF Pin
Richard MacCutchan27-Aug-12 2:31
mvpRichard 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
ihoecken23-Aug-12 22:11
memberihoecken23-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
ihoecken25-Aug-12 1:58
memberihoecken25-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
ihoecken27-Aug-12 22:42
memberihoecken27-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
ihoecken28-Aug-12 4:02
memberihoecken28-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
ihoecken25-Aug-12 1:50
memberihoecken25-Aug-12 1:50 
GeneralMessage Removed Pin
Susan Rich31-Aug-12 6:05
memberSusan Rich31-Aug-12 6:05 
AnswerRe: User Field type Pin
ihoecken2-Sep-12 22:07
memberihoecken2-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
ihoecken26-Aug-12 23:17
memberihoecken26-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
ihoecken26-Aug-12 23:00
memberihoecken26-Aug-12 23:00 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 24 Apr 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid