1

I am trying to read a specific user assignments and tasks from Project Server using PSI and C# these are part of my codes:

_projContext.Load(_projContext.Projects,
                prj => prj.IncludeWithDefaultProperties(p => p.Assignments, p => p.Assignments.IncludeWithDefaultProperties(a => a.Resource.DefaultAssignmentOwner, a => a.Task)));
_projContext.ExecuteQuery();

foreach (var project in projects)
            {
                var tasks =
                    project.Assignments.Where(a => !a.Resource.DefaultAssignmentOwner.ServerObjectIsNull.Value && a.Resource.DefaultAssignmentOwner.LoginName == username)
                        .Select(a => a.Task);
                if (tasks.Any())
                    resultTasks.AddRange(tasks);
}

Until now every thing is OK but I want to have AssignmentProcessStatus field for every assignments, I have to say I know how to achieve this field value from TimeSheetPeriods but at this Project Server there is no timesheet period or timesheet line.

my question: is there any way to access AssignmentProcessStatus field without TimeSheetPeriods?

thanks in advance

Mehdi
  • 1,731
  • 1
  • 18
  • 33

0 Answers0