Click here to Skip to main content
12,451,425 members (49,875 online)

SharePoint

 
GeneralRe: IniWrkflIP.aspx Not exists ? Pin
Ahmed R El Bohoty2-Sep-12 22:16
memberAhmed R El Bohoty2-Sep-12 22:16 
QuestionError occurred in deployment step 'Activate Features': Attempted to perform an unauthorized operation. Pin
HemadriT28-Aug-12 4:13
memberHemadriT28-Aug-12 4:13 
AnswerRe: Error occurred in deployment step 'Activate Features': Attempted to perform an unauthorized operation. Pin
ihoecken28-Aug-12 5:04
memberihoecken28-Aug-12 5:04 
QuestionI can't find my custom WF Pin
AnTiiiKa27-Aug-12 0:19
memberAnTiiiKa27-Aug-12 0:19 
AnswerRe: I can't find my custom WF Pin
ihoecken27-Aug-12 1:25
memberihoecken27-Aug-12 1:25 
GeneralRe: I can't find my custom WF Pin
AnTiiiKa27-Aug-12 2:46
memberAnTiiiKa27-Aug-12 2:46 
GeneralRe: I can't find my custom WF Pin
ihoecken27-Aug-12 5:18
memberihoecken27-Aug-12 5:18 
AnswerRe: I can't find my custom WF Pin
Richard MacCutchan27-Aug-12 1:31
mvpRichard MacCutchan27-Aug-12 1:31 
GeneralRe: I can't find my custom WF Pin
AnTiiiKa27-Aug-12 2:49
memberAnTiiiKa27-Aug-12 2:49 
AnswerRe: I can't find my custom WF Pin
Andrija Juric29-Aug-12 2:10
memberAndrija Juric29-Aug-12 2:10 
QuestionUser Field type Pin
Aptiva Dave23-Aug-12 5:18
memberAptiva Dave23-Aug-12 5:18 
GeneralRe: User Field type Pin
ihoecken23-Aug-12 21:11
memberihoecken23-Aug-12 21:11 
GeneralRe: User Field type Pin
Aptiva Dave24-Aug-12 4:06
memberAptiva Dave24-Aug-12 4:06 
AnswerRe: User Field type Pin
ihoecken25-Aug-12 0:58
memberihoecken25-Aug-12 0: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 5:38
memberAptiva Dave27-Aug-12 5:38 
AnswerRe: User Field type Pin
ihoecken27-Aug-12 21:42
memberihoecken27-Aug-12 21:42 
GeneralRe: User Field type Pin
Aptiva Dave28-Aug-12 2:43
memberAptiva Dave28-Aug-12 2:43 
AnswerRe: User Field type Pin
ihoecken28-Aug-12 3:02
memberihoecken28-Aug-12 3:02 
GeneralRe: User Field type Pin
Aptiva Dave28-Aug-12 3:35
memberAptiva Dave28-Aug-12 3:35 
GeneralRe: User Field type Pin
Aptiva Dave27-Aug-12 5:39
memberAptiva Dave27-Aug-12 5:39 
GeneralRe: User Field type Pin
Aptiva Dave24-Aug-12 5:18
memberAptiva Dave24-Aug-12 5:18 
GeneralRe: User Field type Pin
ihoecken25-Aug-12 0:50
memberihoecken25-Aug-12 0:50 
GeneralMessage Removed Pin
Susan Rich31-Aug-12 5:05
memberSusan Rich31-Aug-12 5:05 
AnswerRe: User Field type Pin
ihoecken2-Sep-12 21:07
memberihoecken2-Sep-12 21:07 
QuestionSharepoint designer encountered an error generating the task form! Pin
AnTiiiKa15-Aug-12 0:22
memberAnTiiiKa15-Aug-12 0:22 
AnswerRe: Sharepoint designer encountered an error generating the task form! Pin
ihoecken26-Aug-12 22:17
memberihoecken26-Aug-12 22:17 
GeneralRe: Sharepoint designer encountered an error generating the task form! Pin
AnTiiiKa27-Aug-12 0:10
memberAnTiiiKa27-Aug-12 0:10 
Questiondisplaying date only Pin
Aptiva Dave14-Aug-12 6:32
memberAptiva Dave14-Aug-12 6:32 
AnswerRe: displaying date only Pin
SPMatt22-Aug-12 11:07
memberSPMatt22-Aug-12 11:07 
GeneralRe: displaying date only Pin
Aptiva Dave22-Aug-12 11:10
memberAptiva Dave22-Aug-12 11:10 
AnswerRe: displaying date only Pin
ihoecken26-Aug-12 22:00
memberihoecken26-Aug-12 22:00 
GeneralRe: displaying date only Pin
Aptiva Dave27-Aug-12 5:38
memberAptiva Dave27-Aug-12 5:38 
QuestionCreated sample webpart and i run that application, i am getting the following error. Pin
HemadriT14-Aug-12 5:47
memberHemadriT14-Aug-12 5:47 
AnswerRe: Created sample webpart and i run that application, i am getting the following error. Pin
SPMatt22-Aug-12 11:10
memberSPMatt22-Aug-12 11:10 
AnswerRe: Created sample webpart and i run that application, i am getting the following error. Pin
Anandavel.p23-Aug-12 2:01
memberAnandavel.p23-Aug-12 2:01 
QuestionCreate new user profile service applications. Pin
HemadriT10-Aug-12 6:15
memberHemadriT10-Aug-12 6:15 
AnswerRe: Create new user profile service applications. Pin
SPMatt22-Aug-12 11:06
memberSPMatt22-Aug-12 11:06 
AnswerRe: Create new user profile service applications. Pin
ihoecken26-Aug-12 22:09
memberihoecken26-Aug-12 22:09 
QuestionI couldn't find enterprise template Pin
HemadriT8-Aug-12 8:13
memberHemadriT8-Aug-12 8:13 
AnswerRe: I couldn't find enterprise template Pin
ihoecken26-Aug-12 22:16
memberihoecken26-Aug-12 22:16 
QuestionSharepoint PeopleEditor Pin
Aptiva Dave7-Aug-12 10:04
memberAptiva Dave7-Aug-12 10:04 
QuestionCustom Workflow - Sharepoint 2010 Pin
AnTiiiKa5-Aug-12 0:34
memberAnTiiiKa5-Aug-12 0:34 
AnswerRe: Custom Workflow - Sharepoint 2010 Pin
Andrija Juric6-Aug-12 3:26
memberAndrija Juric6-Aug-12 3:26 
QuestionInserting item into multi select field Pin
Aptiva Dave3-Aug-12 10:01
memberAptiva Dave3-Aug-12 10:01 
GeneralRe: Inserting item into multi select field Pin
Andrija Juric6-Aug-12 3:44
memberAndrija Juric6-Aug-12 3:44 
GeneralRe: Inserting item into multi select field Pin
Aptiva Dave7-Aug-12 3:17
memberAptiva Dave7-Aug-12 3:17 
GeneralRe: Inserting item into multi select field Pin
Aptiva Dave7-Aug-12 5:28
memberAptiva Dave7-Aug-12 5:28 
GeneralRe: Inserting item into multi select field Pin
Andrija Juric8-Aug-12 2:02
memberAndrija Juric8-Aug-12 2:02 
GeneralRe: Inserting item into multi select field Pin
Aptiva Dave8-Aug-12 4:23
memberAptiva Dave8-Aug-12 4:23 
QuestionConsuming Sharepoint Document library in ASP.NET Pin
K.P.Kannan1-Aug-12 7:59
memberK.P.Kannan1-Aug-12 7:59 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 18 Aug 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid