cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
oscardias
New Member

Set Predecessors in Project Online Tasks

Hello,

 

We have an integration though Power Automate to create pojects and tasks inside Project Online. We've managed to create the tasks with parents and correctly ordered, but we can't find out how to define the predecessors.

 

Our sharepoint schema is as follows (/_api/ProjectServer/Projects('@{triggerBody()?['project_id']}')/draft/tasks/Add()):

{"parameters": {
"Name": "@{triggerBody()?['Name']}",
"Start": "@{triggerBody()?['Start']}",
"Duration": "@{triggerBody()?['Duration']}",
"ParentId": "@{triggerBody()?['ParentId']}",
"AddAfterId": "@{triggerBody()?['AddAfterId']}"
}}

 

Is it possible to add predecessors as well?

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User II
Super User II

Hi @oscardias,


You should be able to use the draft/tasklinks/add method for that.

 

Below is an example where I create a dependency between two task of type Finish to Start (FS):

https://docs.microsoft.com/en-us/previous-versions/office/project-class/jj232950(v=office.15)

 

{
        "parameters":
            {
            "DependencyType": "1", 
            "StartId": "@{variables('PredecessorTask')}", 
            "EndId": "@{variables('SuccessorTask')}"
            }
    }

 

tasklinks.png

View solution in original post

2 REPLIES 2
Expiscornovus
Super User II
Super User II

Hi @oscardias,


You should be able to use the draft/tasklinks/add method for that.

 

Below is an example where I create a dependency between two task of type Finish to Start (FS):

https://docs.microsoft.com/en-us/previous-versions/office/project-class/jj232950(v=office.15)

 

{
        "parameters":
            {
            "DependencyType": "1", 
            "StartId": "@{variables('PredecessorTask')}", 
            "EndId": "@{variables('SuccessorTask')}"
            }
    }

 

tasklinks.png

View solution in original post

oscardias
New Member

Thank you very much! Haven't implemented it yet, but that's exactly what I needed.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,933)