Share via

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

Microsoft 365 and Office | SharePoint | For business | Windows

Answer accepted by question author

Tong Zhang_MSFT 9,261 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.


Was this answer helpful?

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

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.