Adding Timephased Actual Work through the PSI

There is some great content in the SDK on statusing (search for SubmitStatus and UpdateStatus) and even more coming soon.  One of the missing pieces just at the moment is around adding timephased data.  So here is a very brief example.  See the SDK for better examples of programmatically building the XML - but the key piece is the format of the XML passed to the statusing.UpdateStatus web service.  In my example I have a 5 day task assigned to me starting next Monday - and I want to update the actual work in my tasks to show 8h on Monday the 5th and 8h on Wednesday the 7th.  The XML for this change is as follows:- 


<Proj ID="a3349ba9-7eb8-4921-9024-483d0a732f1a">

<Assn ID="dd6a2aa8-b754-48b5-a6fe-b5cd50cea19b">

<PeriodChange PID="251658250"  Start="2007-02-05T08:00:00" End="2007-02-05T17:00:00">480000</PeriodChange>

<PeriodChange PID="251658250"  Start="2007-02-07T08:00:00" End="2007-02-07T17:00:00">480000</PeriodChange>






·         a3349ba9-7eb8-4921-9024-483d0a732f1a is my Proj ID,

·         dd6a2aa8-b754-48b5-a6fe-b5cd50cea19b is my Assignment ID

·         The PID 251658250 means s_apid_actual_work (or Actual Work - from PSLibrary.AssnConstID.s_apid_actual_work - see SDK for more details of these constants)

·         Start and End time format is critical – the ULS logs are good at giving help when you get a LastError=StatusingInvalidChangelist Instructions exception.

·         480000 = 8 hours



So executing the statusing.UpdateStatus(changeXml); where the changeXml is the same as presented above will do exactly the same as entering the two lots of 8hrs in through PWA.  Tuesday will be updated to 0h planned work (because I have entered actual work for Wednesday)  - and 8h will be pushed back to next Monday.

Technorati Tags:

Comments (50)

  1. Gernot Mulisch says:

    Hello, I get this error with help of PSClient error object:


    System.Web.Services.Protocols.SoapException: ProjectServerError(s) LastError=StatusingInvalidChangelist Instructions: Pass this into PSClientError constructor to access all error information

      at Microsoft.Office.Project.Server.WebService.Statusing.SetAssignmentWorkData(String changeXML)

    PSCLientError Output:

    ErrId: StatusingInvalidChangelist

    Error attribute: Message: The ‘PID’ attribute is not declared.

    Error attribute: LineNumber: 0

    Error attribute: LinePosition: 0


    Any ideas?

  2. Hi Gernot,

    A quick pointer would be to check your XML for your changelist and confirm you have a valid PID and are using the correct parameters – it says you don’t have a PID attribute declared.  I can’t enter in to a long support incident via my blog but hopefully this will give you some clues as to where to look.

    Best regards,


  3. Mike says:

    Hi Brian,

    thank you very much for this helpful information. Updating actual work for work resources works fine.

    But updating actual costs (s_apid_actual_cost) for cost resources throws an GeneralUnhandledException SoapException.


     <Proj ID=”28906dc6-ae04-4238-ad4a-b2eea703ee6d”>

       <Assn ID=”111afc47-984b-4d2e-8470-714cb9eb2084″>

           <PeriodChange PID=”251658263″ Start=”2007-03-19T08:00:00″ End=”2007-03-19T17:00:00″>7025</PeriodChange>




    Best regards


  4. seytonjones says:

    In our tests we are using the ChangeXML and we are logging in as FarmAdmin for our tests but we always get these kind of rights issues. Do you have any pointers for me?

    “The request failed with HTTP status 401: Unauthorized.”,”Could not set statusing data for “RALLS KIM” on project “ABCTEST”.”

  5. seytonjones says:

    Actually figured part of this out.  We must run our Serivce as an Administrator to Project Server.  Not sure why yet, but definitely a rights issues somewhere.

  6. Bob Krajci says:

    Brian, In your example above, where does the start/end time come from?  If it’s the working hours for the employee, how do you retrieve that info?  What if the employees work hours are 9-6 and he/she works 3 hours for would the time be 9-12?  Another question. What if the employee puts 4 more hours for day? Would the total be 7 of 4 work hours.  If 4, any way to increment so it shows 7?

  7. John Fischer says:

    This works great as long as I’m trying to update my own time.  Is there a way to update time for others?  I have full admin rights to Project Server 2007, but it looks like I need to dig into Impersonation to be able to put time into other resources Tasks page?

  8. Yes John, you will need to use impersonation to do this.  See the SDK for details.


  9. says:

    Is there an equivalent way to update cost information for cost resources?  I don’t see a PID value for costs, but it doesn’t seem appropriate to enter "work" values for a cost resource.

  10. Ken Henderson says:

    Hi Brian,

    Thanks for posting a simple example of the changeXML structure.

    I have constructed one almost identical to it but it is throwing an exception: StatusingInvalidChangeList.

    Could it also throw that if I were not the assignment owner on the assignment it is trying to change (via the SetAssignmentWorkData(changeXML) method.

    Or would being the wrong user generate a different exception.

    The changeXML is:


       <Proj ID="0A6F67D0-283E-44EB-93B0-1A594F017670">

           <Assn ID="70B8AD54-D19C-41E4-937E-5EDE442D159C">

               <PeriodChange PID="251658250" Start="2008-03-21T08:00:00" End="2008-03-21T17:00:00">60000</PeriodChange>




    Surely, the case of the GUIDs doesn’t matter, does it?

    Thanks for your help!


  11. Ken Henderson says:

    FYI – the following is the C# code used to produce the above changeXML string:



                   string actStart = "2008-03-21" + "T08:00:00";

                   string actEnd = "2008-03-21" + "T17:00:00";

                   uint actual = PSLibrary.AssnConstID.s_apid_actual_work;

                   uint remaining = PSLibrary.AssnConstID.s_apid_remaining_work;

                   StringBuilder changeXml = new StringBuilder();

                   changeXml.AppendFormat("<Changes>", ProjID);

                   changeXml.AppendFormat("<Proj ID="{0}">", ProjID);

                   changeXml.AppendFormat("<Assn ID="{0}">", AssnID);

                   changeXml.AppendFormat("<PeriodChange PID="{0}" Start="{1}" End="{2}">{3}</PeriodChange>", actual, actStart, actEnd, ActWorkValue);




                   return changeXml.ToString();


  12. Subramanian Vasudevan says:


    Can anybody tell me if Statusing Updates are possible on an assignment of a Project Resource (Not from the enterprise pool) to a Task, given that the user is the owner/creator of the Project and all the Tasks under it?

    Is it true that Statusing Updates are possible only on assignments of Enterprise Resources belonging to the Project Team and not on locally created Project Resources?

    Grateful for any help…

  13. Wessel says:

    Hi Brian,

    I always get the same error when I enter any upate to one of the task in My Tasks in the Project Web Acess interface. I did not do any programming, and I do not use the SDK.

    Further, the actuals are not updated in the project file.

    Is this a bug?

  14. Hi Wessel,

    It may be a bug – what error are you getting?

    Best regards,


  15. Hi Subramanian,

    It isn’t possible to update local resources tasks through the statusing web service.  Even though they do show within Project Professional as having an Assignment Owner (the project owner/manager) this person does not see the assignments on My Tasks.  You can also confirm with the ChangeXML sample that these tasks are not visible.  You could use an enterprise resource in place of these local resources, but do not have them as "users" and set their assignment owner to the project owner manager.

    Best regards,


  16. Mike says:

    Trying to use this to update time-phased task status, but it periodically fails, giving me the following error. (Passing into the PSI constructor does not get more specific then  (GeneralUnhandledException)


    <Proj ID="f16860a7-fb01-49e2-8a42-230f554520ac">

    <Assn ID="46fde2ba-bbd9-4e41-bceb-24905b907cb7">

    <PeriodChange PID="251658250" Start="2007-12-18T12:00:00"




    12:07:07 PM : Status Update failed for: 46fde2ba-bbd9-4e41-bceb-24905b907cb7

    12:07:07 PM : GeneralUnhandledException

    System.Web.Services.Protocols.SoapException: ProjectServerError(s)

    LastError=GeneralUnhandledException Instructions: Pass this into

    PSClientError constructor to access all error information




    However, this blurb is in a loop processing many timesheets from an event  I’m trying to port over to MSP, most of the timesheets come over just fine.  

    (including other timesheets for this particular user).  However for this  assignment and one other one, it decides to reject all (but one) of the timesheets for this assignment.  this error seems to always occur for a specific assignment after the first time data for that assignment goes through, then all subsequent assignment updates fail.

    I’m curious what would cause this "general unhandled exception", as that’s not the most helpful error message in the world…

  17. Hey Brian,

    Thanks a lot for that reply. But it only thickens the soup we are in now.

    We have a requirement that the Standard Rate of all our resources must be allowed to vary from Project to Project. For example, suppose we define a Labour resource called ‘Carpenter’. For Project1, his would have quoted his standard rate as $41/hour. But for another project, Project2, another Carpenter might quote a standard rate of $50/hour. This all leads us to choose Project Resources over Enterprise Resources, which means that I have to create a new ‘Carpenter’ resource under each project.

    But we also have the requirement of being able to make Time-Phased actuals updates on the work done by these 2 carpenters for the 2 projects. Statusing Updates is not possible on Project Resources, which is why we are stumped.

    As of now, we are creating a separate Carpenter Resource in the Enterprise Pool for each project (name suffixed with some unique ProjectID) for whom the standard rates differ. This we feel is cluttering up our Enterprise Resource Pool. Is there a better way of doing this, or should we have to stick to creating a new Enterprise Resource for each Project?

  18. Hi Mike,

    No, not the best error message in the world.  I’m not sure what is going wrong but I’d see if there is anything unusual with that assignment.  Are there other resources assigned?  Is the work being posted outside the start finish range?  Could the project be checked out – or the assignment been deleted and then re-created (with a new GUID).  You may need a support incident to dig deeper…

    Best regards,


  19. Hi  Subramanian,

    I can see your problem.  One option might be to use a custom cost field – but any way you do it will need some sort of lookup for the right rate for the right project.  It comes down to the lowest pain for the benefits you need.  

    Sorry I can’t be more help, but the Project newsgroups might have more ideas. The guys there tend to be more "hands-on" with the project management side of things – whereas I’m more about the technical side of things.

    Best regards,


  20. Subramanian Vasudevan says:

    Hi Brian,

    First of all, thanks a lot for all the help you have given me before. I have a new query regarding Cost Resources.

    We have added a type of resource called ‘Miscellaneous’ that must be mapped to a Cost Resource in Microsoft Project.

    As of now, let’s assume that for every Misc. Resource, I create a counterpart in MSP’s Enterprise Resource Pool. First question: Can I set the default assignment owner (as myself) for such a Cost Resource during creation in the Enterprise Pool?

    Now let’s assume I can do that. Then I proceed to import that cost resource into the Project Team (which includes myself) and create an assignment to the respective tasks which include it.

    We have a requirement that we should be able to record Actual Cost incurred over that Cost Resource Assignment during the execution of the project. The problem is, I’m unable to locate that assignment in the ChangeXML sample program.

    Can the Status Update mechanism be used to update Actual Costs incurred over Cost Resource Assignments? If not, what is the solution to my requirement? ie: How do I record the Actual Costs incurred over Cost resources using the PSI?


  21. A very good question Subramanian – and one I don’t know the answer to,  but I will ask around and see what I can find out.

    Best regards,


  22. Hi Brian,

    I’ve tried the following stuff, none of which seems to work.

    1. I’ve tried setting myself as the Default_Assignment_Owner for the Cost resource when I create it in the Enterprise pool, but I’m not able to do that through PWA/Project Professional Client.

    2. I’ve tried adding myself as Assignment Owner for the assignment in the specific project though Project Professional, but that field shows up as disabled/un-editable.

    3. Through the Statusing Web Service, I’ve tried ReadStatus() to read the list of assignments I’m eligible to post status updates for, but the cost resource assignment alone is not visible. If i disregard that, and construct ChangeXML to update actual cost for that assignment_uid of the cost resource anyway, and try to post the status update, it throws back an exception. (Invalid Assn_Uid)

    4. I’ve tried reading in the ProjectDataSet, modifying the ASSN_ACT_COST or the ASSN_ACT_WORK for that assignment and using QueueUpdateProject() to update those fields, but that throws me back an exception as well, saying ‘ProjectCannotEditCostResource’ with Error code 1050.

    Running out of ideas. 🙂 Posted it on several blogs and the Project.Developer NewsGroup, no replies till now.

    Best Regards,


  23. Hi Subramanian,

    I have had discussions with various people – some of whom also had your original question – and here is the definitive answer.

    It is not possible to use the PSI for manipulation of costs on a cost resource.  You can for actual costs for other resource types but not cost resources.

    Sorry for this inconvenience, and hope that maybe using other types of resources will work for your scenario.

    Best regards,


  24. Hi Brian,

    I was afraid I would not get far. I’m having discussions with the folks at my company, and we may have to scrap cost resources out, because status updates are not possible.

    Thanks for everything,

    Best regards,


  25. Patrizio says:

    Hi Brian,

    I need to programmatically add timephased cost data from an external flow to projects on Project Server 2007.

    You said that there’s no way to do it by PSI (I didn’t find any method).

    I will try to do it by automating Project Professional 2007 (timephased metods for cost resources are available in Project Pro).

    Have you any other suggestion ?



  26. Hi Patrizio,

    No other suggestions – I think that is your only option.

    Best regards,


  27. Hi Brian,

    I have a Project Plan in our application which we need to keep in Sync with a Project on Project Server. While pushing new tasks, I have to try to push them with the mentioned start and end dates from my application.

    I understand from the SDK that we can only EITHER specify the date the task can start on OR the date it can end on, using TASK_CONSTRAINT_TYPE in combo with TASK_CONSTRAINT_DATE. But we can’t specify both dates and expect MSP to fix both start and end dates of the task. Is this right? Is there no way to fix both dates?


    Subramanian Vasudevan

  28. Hi Brian,

    I seem to have run into a nagging isuse.

    UpdateStatus in the Statusing Web Services sporadically fails with a GeneralUnhandledException with regard to certain Assignments alone, and that too only on some periodchange dates alone.

    Status Update on the same assignment succeeds on some other dates. I parsed the ULS logs and this is what I got, seemingly some Unique constraint is being violated somewhere.


    12/08/2008 11:56:33.72 w3wp.exe (0x0720)                       0x106C Project Server                 Project Server – General       0 Medium   PWA:http://aurexchedge/pwa, SSP:SharedServices1, User:AURIGOBLRaxacc, PSI: Statusing.UpdateStatus  Undefined Attributes: PSError: GeneralUnhandledException  Undefined attributes list: System.ArgumentException: These columns don’t currently have unique values.     at System.Data.ConstraintCollection.AddUniqueConstraint(UniqueConstraint constraint)     at System.Data.ConstraintCollection.Add(Constraint constraint, Boolean addUniqueWhenAddingForeign)     at System.Data.DataTable.set_PrimaryKey(DataColumn[] value)     at Microsoft.Office.Project.Server.DataAccessLayer.Generated.StatusingDalBase.CreateSavedTask(Nullable`1 p0, Nullable`1 p1, Nullable`1 p2)     at Microsoft.Office.Project.Server.BusinessLayer.Statusing.CreateSavedTask(PlatformContext context, DalDataAccess dataaccess, ISvrDocEdi… f8d4c922-a9da-412b-8deb-c105ba2926ec


    Wondering if you could shed some light on this. I’m following the microsoft.project.developer forum where someone as posted the same problem. The link is:

    Best regards,


  29. Hi Subramanian,

    The only way to fix both dates is to use one date and a duration.  So setting the start date and constraint type and a duration will be the only way to fix the end date.

    I hope this helps,

    Best regards,


  30. Hi Subramanian,

    For the statusing errors I am not sure what is happening, but the fact that (from the newsgroup posting) you appear to work around this by unpublishing and then republishing it appears the assignment has some problems.  The CreateSaved in the error may indicate the issue is when creating the entry in the MSP_TASKS_SAVED table or the MSP_ASSIGNMENTS_SAVED tables.  Without some other details to go on such as some relationship between the failing assignments and a consistent repro to get the error this may be difficult to track down.  One thing to note is that the TASK UID changes on tasks when the first time is recorded for an assignment – this has caught out some developers when handling task/assignment data outside Project Server.

    Best regards,


  31. Hi Brian,

    Thanks a lot for the speedy reply.

    Yes, I’m aware that the TASK_UID changes after the first Status Update. I’m handling that as well by checking with the TASK_PUBLISHED_UID which seems to remain a constant. Anyways I’m not using Task Updates at all, only Assignment Updates, so thats not an issue.

    Yes, I perceive that the Assignment/Task published data is getting corrupt or something after the first Status Update. This is why running a fullPublish on the Project is getting rid of the problem. But the fullPublish must be done after each and every update on the assignment, which kinda bogs down the whole thing.

    Now, I have made some inroads into this issue, because of similar problems ppl are having with Timesheets. Refer:

    According to the last post by Gary L. Chefetz, if you ensure that 0 actual work is recorded on non-working days, its supposed to work fine. I applied the same rule and started recording Actual Work on consecutive days in sequence (without non-working days in the middle) and this problem simply disappears. Is there a hotfix or something for this issue? If so can you pass on the hotfix number?

    Best Regards,


  32. Thanks for the feedback Subramanian – and the link and tips.  I’ll dig to find if there are any fixes around this – and perhaps talk to Gary too.

    Best regards,


  33. Hi Brian,

    Thanks a lot for the help so far. 🙂

    On the same note, I’ve done a lot of reading but I’m unable to get an answer to this question:

    Is it possible to delete Time-Phased Statusing info for a particular assignment at a given date?

    I’m building a Status Update UnApprove feature in our application, which has to basically UNDO what was done during the status update.

    If there is no way to do this, will entering a Zero for actual work on that date through Status Update make any calculations go haywire? Which method should I follow?



  34. Hi Brian,

    There’s a part of my code that has stopped working after applying some hotfixes to MS Project Server.

    Earlier, I just had to set the Resource’s Default Assignment Owner when creating the resource. Then I create an empty Project. Then when I build the Project Team using QueueUpdateProjectTeam, they get imported into the Project. After that I just construct the required Tasks and Assignments and call QueueAddToProject, all of the above works fine.

    Earlier, the Default Assigment Owner became the Assignment Owner automatically, for each assignment. But, after applying the hotfixes, this does not happen. I’m thus facing problems when using Status Updates.

    Please advise me what to do…

    Thanks and regards,


  35. Hi Subramanian,

    I am looking in to this.  I will keep this thread posted of progress.


  36. Hello Brian,

    I seem to have run into a possible bug in the Project Server Scheduling Engine.

    In our application, we dont maintain any scheduling information except the Project Start Date, rest is not mandatory. Hence I’ve written code that creates a Project with that StartDate and then I want to default all the Tasks to the ProjectStartDate.

    Earlier, I used to just set the ProjecTStartDate and that would be it. The tasks would default automatically to the ProjectStartDate. That was fine until we discovered that the PSI throws ‘ProjectSchedulingEngineException’s all over, if the task work was increased to enormous values.

    Hence, I started to explicitly set a constraint on each task, ‘MustStartOn’ and specifying the Constraint Date as ProjectStartDate.It works fine, except for one thing. Say I use the following code to set the Constraint Date:

    TaskRow.TASK_CONSTRAINT_TYPE = (short)PSLibrary.Task.ConstraintType.MustStartOn;

    TaskRow.TASK_CONSTRAINT_DATE = Convert.ToDateTime("1/27/2009 12:00:00 AM");

    Then when I open the project in Microsoft Project Professional, I see that the Task Start Date (and Project Start Date) reads "1/26/2009". What makes it even wierd is that when I use ReadProject() to read the ProjectDataSet back, I see that the TaskStartDate (and ProjectStartDate) is exactly "1/27/2009 12:00:00 AM". But in Microsoft Project Professional it is one day less.

    My actual concern is that when a MustStartOn constraint is set, the TaskStartDate is being set with the Time component also set as 12:00 AM (whatever I feed in the DateTime input). I feel the Scheduling Engine is supposed to set it based on the BaseCalendar, which dictates that Work time starts from 8:00 AM. This, I feel is confusing Microsoft Project Professional in its calculations.

    Please reply is you feel if this is a bug, and I would be grateful if you could give me a workaround.

    Thanks and regards,

    Subramanian Vasudevan

  37. Hi Subramanian,

    This is probably being thrown out by calendars in some way.  12am is usually non working time – so may be set to 5pm the previous day.  Does this still happen when you use a 24 hour working time calendar?  The two scheduling engines are not always going to give exact matched results due to constraints in the server side scheduler.

    Best regards,


  38. Stephen Eyton-Jones says:

    Hello Brian.

    We have been struggling with this error now on and off for the last couple of months and cannot seem to get past it no matter what we do.

    I created a fresh installation of Project Server 2007 with SP1 this week and did a basic standalone installation as the domain Administrator.  I then linked into my AD to pull some resources and set up a very simple 1 activity project with 1 resource and am now trying to send actuals back using the statusing.asmx and impersonation.  I’ve read as much as I can find about the issue, but still have no solution.

    Is there some setting in Project Server, or IIS that has to be tweaked in order for this to work correctly.

    This is the error we get over and over again.

    "The request failed with HTTP status 401: Unauthorized.","Could not set statusing data for "SMITH JOHN" on project "Testing Project 1"."

  39. Hello Brian,

    I seem to have run into a possible bug in the Project Server Scheduling Engine.

    In our application, we dont maintain any scheduling information except the Project Start Date, rest is not mandatory. Hence I’ve written code that creates a Project with that StartDate and then I want to default all the Tasks to the ProjectStartDate.

    Earlier, I used to just set the ProjecTStartDate and that would be it. The tasks would default automatically to the ProjectStartDate. That was fine until we discovered that the PSI throws ‘ProjectSchedulingEngineException’s all over, if the task work was increased to enormous values.

    Hence I have started explicitly mentioning the TASK_START_DATE when using QueueAddtoProject. But when I read back the Project Data from Project Server, it gives me erroneous values for the TASK_START_DATE, mostly something like ’03/02/2009 9:30 PM’ for Start Date and ’03/04/2009 1:30 AM’ for Finish Date. This is leading to lots of problems with using those dates in our application.

    I’ll be grateful for any help in this regard. If there are any available hotfixes for this issue, could you point me to it?



  40. BTW, the problem still occurs if I use a calendar with 24 hour working time. This time, the times change on the start and end dates, but they are still erroneous (starting at 1:30 PM and ending at 9:30 am for ex)…

  41. Hi Subramanian,

    What format are you using for the start date and what is the time zone set on the server?  I am wondering if some time zone issue is causing the shift in time.

    Best regards,


  42. Hey Brian:

    Just reading up on the PSI Cost Resource issue (that we cannot update actual costs via PSI), and I see that we can manipulate timephased data for these cost resources via MS Project Professional.

    Do you know of someone who has automated this for multiple projects in an enterprise? Say we wanted to pull data from another data source into the project. Is there an example of such an implemenation?

    Also, are there any plans to improve PSI for 2010 such that it includes methods for Cost Resources?


  43. rakesh.babu says:


    I’m trying to change the assignment owner of few of the assignments in my project server. I’m doing that through ProjectWebService.QueueUpdateProject. This works most of the times. But sometimes it could not update the assignment owner and it does not even log any error in the server queue. Any inputs on this?

  44. Hi Rakesh,

    I’m not aware of any issues.  Could be permissions.  Worth checking that you can manually make the changes you are trying to do programmatically.  Next steps would then be to try and isolate what is different for the ones that don’t appear to work.  A support case and one of our Support Engineers might help isolate the problem.

    Best regards,


  45. Don Landry says:

    Hi Brian,

    Do you have an example of this for Powershell for Project Online? I am trying to process Status Updates by accessing the $ProjContext.EnterpriseResource for a given user then accessing that users timephase assignments. What I am finding is even though I get the userid via the users Guid and then reference that user to get assignments the request brings back all assignments that user is a status owner of not just the users assigned tasks. When that happens I get assignments for generic or unassigned resources if the user is a project owner. The code I is outlined below.

    -authenticate into project online and reference the $ProjContect = New-Object Microsoft.ProjectServer.Client.ProjectContext($PWAInstanceURL)

    Then I get the resource who is also a project manager that owns several projects

    $assignRes = $projContext.EnterpriseResources.GetByGuid(“xxx”)

    This works great it returns 1 record

    From here I get the assignment by time phase setting the assignment $start to 01-09-2017T08:00:00 and $end to 01-09-2017T17:00:00

    $timePhase = $assignRes.Assignments.GetTimePhase($start, $end) (THIS DOESN’T WORK NO MATTER WHAT DATES I USE. IF I CHANGE THE LOAD BELOW TO JUST LOAD $timePhase it returns nothing)
    $projContext.Load($timePhase.Assignments) (THIS WORKS BUT RETURNS EVERYTHING – EVEN IF I TRIED $timePhase.Assigements.GetbyGuid using a specific assignment it doesn’t return anything)

    for the first resource I’m using this works fine because they only have 842 status owner assignments but for others I get a throttling error because its returning over 7000 rows and
    Project Online shuts it down.

    Again what I noticed though is it returns every assignment that the user is assigned to but also returns assignments that the user is status owner of includes unassigned assignments on projects that he is an owner on and assignments that have generic resources assigned that he is an owner on.

    I have tried and failed to filter the $projContext.Load($timePhase.Assignments) to only attempt to return the assignment the user is assigned to. What I need is to do a $projContext.Loadquery where the $timePhase.Assignment is filtered but I need it in a Powershell format. I have also tried a ton of variations. more than I can list here. I was hoping you would have some powershell ideas on how to send a filter with the load. Any ideas would be greatly appreciated I’ve been working on this on and of for a few months…ugh.

    Hope you’re doing well.


  46. Don Landry says:

    Hi Brian,

    Just a bit more detail on this and one other question.

    The goal of doing the status updates is to be able to update actual hour and actual cost on a specific transaction date day that is sent to me via a transaction file. Do you know if that is possible because in the object model there is nothing in the StatusAssignmentCollection Methods that would lend it to update on a particular date. I’m assuming it just takes the day the program is running and use basically current date even though my transaction date may be 1 day prior. If updating the status assignment for a specific date is possible let me know or if you could add it to a wish list to update the object model that would be great.

    After more analysis this is where I’m at.

    1. The status assignments are based on project owner not the actual resource that owns the project so if I use a resource id that is an owner across say 10 projects and those projects have 10,000 assignments I will get hit with a threshold error.

    2. What I am going to do is for each project I need to process I will change the project owner to the service account I’m using to run my jobs. Since that service account isn’t an owner on any other project I can be assured that I won’t hit a threshold issue unless someone is crazy enough to create a project or master project with 7000+ tasks. That’s not something I would code for.

    3. Once I change the owner and republish the project I can get all the assignments for that service account resource which will only be the ones for the project its an owner on.

    4. Now that I have all the assignments I can parse through them looking for only the assignments with matching guids on my transaction file and update them with the info supplied.

    5. Then I will change the project owner back to the original owner and proceed to the next project.

    Let me know your thoughts on this it would be great to get some feedback or ideas on a better approach.



  47. Don Landry says:

    Hi Brian,

    Sorry for the continued posts but I’m working the issue and found that what I’m trying to do won’t work unless you know of a way to update the assignment owner programmatically. Changing the owner of the project doesn’t do anything to who the assignment owner is and unless I can get the service account to be the owner of the assignment I need to update then I can make changes to it. So I would need to parse through all the assignments I need to update and change the assignment owner to the service account then make the updates and parse through all the assignments and change the assignment owner back to what it was.

    Thoughts on how to accomplish this would be great.



  48. Don Landry says:

    Hi Brian,

    After more research basically I need an example or a contact to get a powershell example of using the Submit Status for Resource Method. Within your Web Service Statusing class (Project Server SDK) you have a Statusing Class and within that class you have a method called Submit Status for Resource. I need an example created to submit status for resource using powershell not C#. How can I programmatically access Project Online using the Submit Status for Resource method to update an assignment for a resource.

    I also looks like I would need to download and import the ProjectServerWebServices.dll Where do I download the current ProjectServerWebServices.dll and can I use that against Project Online.

    1. Hi Don, and sorry for the slow reply – and I have been reading your comments but haven’t had a quick way to answer. I’m well thanks – good to hear from you and hope you are ok too. We don’t support the PSI web service calls against Project Online – only CSOM. And I think we are missing a programmatic way to change the assignment owner currently – but it is a request we keep hearing so I will check if this is coming. I know Paul Mather has done a lot with PowerShell and has some stuff in the TechNet gallery as well as on his blog – have you seen that? I expect you have. We did recently make some fixes in Project Server 2016 for the Service Broker permission where we where breaking if there were some updates that we couldn’t read in the GetTimePhased call – see Not sure if you might be hitting this. This probably isn’t something I’ll get time to dig into very soon – pretty hectic here – and as you will appreciate with the work you have already done on this, unless you are living it every day it isn’t something you can just jump in to. I haven’t done much with PowerShell and Project Online/Server recently. I’ll see if I can find anyone who has some examples – but Paul might be your best bet.
      Best regards,

Skip to main content