top of page
Writer's pictureLeoza Kabir Barker

Power Automate: Create Project Tasks directly into Project for the Web

For those familiar with Project for the Web and the Project Accelerator, you’ll know it's a highly flexible and customizable tool. We've helped clients tailor it to support various project management methodologies and organizational needs. However, one key challenge is its one-way synchronization with Dataverse: while updates made in Project for the Web reflect in Dataverse, changes made directly in Dataverse don’t sync back to Project for the Web’s task view.


To solve this, my project team members (Thank you Jin Shi and Michael Godby) and I have figured out a way to create/modify records—like tasks and labels—directly in Project for the Web. This approach uses four key actions to make sure updates show up where they’re needed.


To be able to automate the creation of tasks directly into Project for the Web for instance (I will be using Project Task for the purpose of this blog but some other tables that apply are: Project Task Dependency, Resource Assignment, Project Bucket, Project Label, Project Goal, etc), we need 4 main unbound actions:

  1. Create Operation

  2. Create/Update/Delete (in our case, we will be creating a task)

  3. Execute operation

  4. Abandon operation if one of the above operation fail

 

  1. For the purpose of this blog, I will use a simple manual flow with the following parameters:

    1. Task Name: Name of the task

    2. Start: Start Date of the task

    3. End: Finish Date of the task

    4. Project: Project GUID that the task will be associate with

Manual Trigger
  1. Initialize a string variable for Odatatype

    Odatatype
  2. Perform an unbound action: Create an Operation Set

    1. Action Name: msdyn_CreateOperationSetV1

    2. ProjectId: [Project GUID from trigger]

    3. Description: Start Execution

      Create an Operation Set

  1. Perform an unbound action: Create Task

    1. Action Name: msdyn_PssCreateV1

    2. Entity:

      {

        "@{variables('Odatatype')}": "Microsoft.Dynamics.CRM.msdyn_projecttask",

        "msdyn_project@odata.bind": "/msdyn_projects(@{triggerBody()['text_1']})",

        "msdyn_projectbucket@odata.bind": "/msdyn_projectbuckets([BucketGUID])",

        "msdyn_subject": @{triggerBody()['text']},

        "msdyn_start": "@{triggerBody()['date']}",

        "msdyn_scheduledstart": "@{triggerBody()['date']}",

        "msdyn_scheduledend": "@{triggerBody()['date_1']}",

      }

      Note: Make sure you have all the required fields in this action

    3. OperationSetId: [msdyn_CreateOperationSetV1Response OperationSetId from Create Operation action]

Create a task

  1. Perform an unbound action: Execute Operation

    1. Action Name: msdyn_ExecuteOperationSetV1

    2. OperationSetId: [msdyn_CreateOperationSetV1Response OperationSetId from Create Operation action]

      Execute Operation
  2. Perform an unbound action: Abandon Operation

    1. Action Name: msdyn_AbandonOperationSetV1

    2. OperationSetId: [msdyn_CreateOperationSetV1Response OperationSetId from Create Operation action]

      Abandon Operation

Note: Set the run after configuration to be after:

  • Has failed

  • Is skipped

  • Has timed out

Configure run after

To watch this flow in action, watch the video below:



 

For more information, check out the following resources:


Hope it helps!


About Me

I'm Leoza Kabir Barker, a Functional Consultant at XRM Vision with a focus on the Power Platform. Through my expertise, I aim to streamline processes, optimize operations, and maximize productivity. 


Connect with Me

Comments


bottom of page