0

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!!
}

2 Answers 2

1

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 :)

1
  • That looks like it's specific to SharePoint standard tasks, not Project Server tasks. It IS helpful, though. Upvote for you!
    – Wesley
    Sep 25, 2012 at 22:54
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.