none
Update with odata /REST (Project online) RRS feed

  • Question

  • Hello, anyone could give me an example of how to update the attributes of a project through REST / OData using JavaScript as the programming language?
    Tuesday, November 3, 2015 6:00 PM

Answers

  • This functionality is partially available via CSOM (which is suppose to call PSI behind the scenes). This is a thread I started and actually got confirmation from Microsoft:

    https://social.microsoft.com/Forums/en-US/be27d497-e959-44b6-97cb-8f19fe0278fe/csom-how-to-set-timephase-data-on-an-assignment?forum=project2010custprog

    Basically, they have not been able to provide a method that allows an admin user to update assignments for another user, but it is, however, possible to update your own assignment. Maybe my thread will give you some clues to be able to solve this with JSOM, as long as you only update assignments for the currently logged on user. If you need it to be done by an admin user for other resources, then you might be stuck, like me. I had to resort to using the Statusing API of the PSI.

    Hope it helps you a bit.

    • Marked as answer by Denis Ursulino Wednesday, November 4, 2015 12:28 PM
    Tuesday, November 3, 2015 8:45 PM

All replies

  • Hello,

    The Odata (ProjectData) API is a read only reporting API, to do updates look to use JSOM or the REST API (/ProjectServer). Take a look at the example below for JSOM:

    https://msdn.microsoft.com/en-us/library/office/jj163093.aspx

    Paul


    Paul Mather | Twitter | http://pwmather.wordpress.com | CPS | MVP | Downloads

    Tuesday, November 3, 2015 6:44 PM
    Moderator
  • Paul, thanks for the response and attention.

    Already took a look at this article, and did not meet my need.

    I am developing a hybrid app, which need to update a particular assignment. Basically equal to (sites / pwa / TaskDetails.aspx) screen of the project online.

    And I have not found any examples of REST update.

    Thank you.
    Tuesday, November 3, 2015 6:57 PM
  • This functionality is partially available via CSOM (which is suppose to call PSI behind the scenes). This is a thread I started and actually got confirmation from Microsoft:

    https://social.microsoft.com/Forums/en-US/be27d497-e959-44b6-97cb-8f19fe0278fe/csom-how-to-set-timephase-data-on-an-assignment?forum=project2010custprog

    Basically, they have not been able to provide a method that allows an admin user to update assignments for another user, but it is, however, possible to update your own assignment. Maybe my thread will give you some clues to be able to solve this with JSOM, as long as you only update assignments for the currently logged on user. If you need it to be done by an admin user for other resources, then you might be stuck, like me. I had to resort to using the Statusing API of the PSI.

    Hope it helps you a bit.

    • Marked as answer by Denis Ursulino Wednesday, November 4, 2015 12:28 PM
    Tuesday, November 3, 2015 8:45 PM