Click here to Skip to main content
       

Sharepoint

 
GeneralRe: I can't find my custom WF Pinmemberihoecken27-Aug-12 5:18 
AnswerRe: I can't find my custom WF PinmvpRichard MacCutchan27-Aug-12 1:31 
GeneralRe: I can't find my custom WF PinmemberAnTiiiKa27-Aug-12 2:49 
AnswerRe: I can't find my custom WF PinmemberAndrija Juric29-Aug-12 2:10 
QuestionUser Field type PinmemberAptiva Dave23-Aug-12 5:18 
GeneralRe: User Field type Pinmemberihoecken23-Aug-12 21:11 
GeneralRe: User Field type PinmemberAptiva Dave24-Aug-12 4:06 
AnswerRe: User Field type Pinmemberihoecken25-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 PinmemberAptiva Dave27-Aug-12 5:38 
AnswerRe: User Field type Pinmemberihoecken27-Aug-12 21:42 
GeneralRe: User Field type PinmemberAptiva Dave28-Aug-12 2:43 
AnswerRe: User Field type Pinmemberihoecken28-Aug-12 3:02 
GeneralRe: User Field type PinmemberAptiva Dave28-Aug-12 3:35 
GeneralRe: User Field type PinmemberAptiva Dave27-Aug-12 5:39 
GeneralRe: User Field type PinmemberAptiva Dave24-Aug-12 5:18 
GeneralRe: User Field type Pinmemberihoecken25-Aug-12 0:50 
GeneralMessage Removed PinmemberSusan Rich31-Aug-12 5:05 
AnswerRe: User Field type Pinmemberihoecken2-Sep-12 21:07 
QuestionSharepoint designer encountered an error generating the task form! PinmemberAnTiiiKa15-Aug-12 0:22 
AnswerRe: Sharepoint designer encountered an error generating the task form! Pinmemberihoecken26-Aug-12 22:17 
GeneralRe: Sharepoint designer encountered an error generating the task form! PinmemberAnTiiiKa27-Aug-12 0:10 
Questiondisplaying date only PinmemberAptiva Dave14-Aug-12 6:32 
AnswerRe: displaying date only PinmemberSPMatt22-Aug-12 11:07 
GeneralRe: displaying date only PinmemberAptiva Dave22-Aug-12 11:10 
AnswerRe: displaying date only Pinmemberihoecken26-Aug-12 22: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
Web02 | 2.8.140814.1 | Last Updated 13 Aug 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid