Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

It's been tough finding good material on Project Server/SharePoint integration from a development standpoint.

What I'd like to do is create a web part that can be deployed to any sharepoint site, that gets all reminders (Tasks, timelines, timecards, issues, risks etc...) for a given SPUser.

It seems to me I need to be able to do the following:

  1. Find Project Server Site in current Farm/Site Collection
  2. Find all List Items where AssignedTo = SPUser
  3. Returns this collection for sorting, rendering etc...

I've seen a couple walkthroughs that demand you have a Project Server Web Part on the page to get that information, and I need to be able to do this without that dependency. Where do I start?

Can I do something like:

var rootSiteCol =SPContext.Current.Web.Site.WebApplication.Sites[0].Url
var ProjectSite = rootSiteCol.AllSitesAndWeb["Project"];
var Lists = ProjectSite.AllLists;
foreach(List in Lists)
{
    //Enumerate and win!!
}
share

2 Answers 2

have you tried using caml to query all lists in sites and subsites?

<Where><Or><Eq><FieldRef Name="AssignedTo" LookupId="TRUE"/><Value Type="Integer"><UserID /></Value></Eq><Membership Type="CurrentUserGroups"><FieldRef Name="AssignedTo"/></Membership></Or></Where><OrderBy><FieldRef Name="DueDate"/></OrderBy>

or

you can use this ;) :

http://sanjayapdl.wordpress.com/2008/03/21/single-web-part-to-display-tasks-assigned-to-current-user-and-current-users-groups/

hope it helps :)

share
    
That looks like it's specific to SharePoint standard tasks, not Project Server tasks. It IS helpful, though. Upvote for you! –  Wesley Sep 25 '12 at 22:54
up vote 0 down vote accepted

Never found an answer, but don't want to mark the incorrect answer

share

This site is currently not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .