DraftTask change parent programatically

Alex PAJON 21 Reputation points
2022-05-06T11:56:09.277+00:00

Hi ,
I try to move a Project server Task by REST API using the draftTask object and REST API.
I try to do so by changing values of properties ParentID, WorkBreakdownStructure, OutlinePosition, but the Task doesn't want to move in project Server.

I use this API an MERGE operation on uri https://xxxxx.sharepoint.com/sites/xxxxx/\_api/ProjectServer/\[ProjectId\]/Draft/Tasks(\[TaskId\])
with this body
{
"__metadata": { "type": "PS.DraftTask" },
'Name':'NewName',
'WorkBreakdownStructure':'[ParentOutlinePosition].1',
'OutlinePosition':'[ParentOutlinePosition].1',
'ParentId':'[ParentGuid]',
}
In my sample, Only the Name change

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,268 questions
{count} votes

Accepted answer
  1. Tong Zhang_MSFT 9,141 Reputation points
    2022-05-09T08:05:41.483+00:00

    Hi @Alex PAJON ,

    Since this issue is about Project, Microsoft has a dedicated forum to discuss about Project issues, I suggest you can get some more professional advice in this forum.

    Forum:
    Project - Microsoft Tech Community


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Alex PAJON 21 Reputation points
    2022-05-09T09:53:41.457+00:00

    Thanks, I move my post on this dedicaced forum

    0 comments No comments