Creating To-Do tasks from D365 PSA’s Resource Assignments with Flow

Tested on:
Dynamics 365 CE version 9.1, PSA solution version 3.5, Unified Interface

I recently traveled back from the MVP Global Summit with a colleague and fellow MVP Vesa “Vesku” Nopanen. Vesku is a “Microsoft Teams MVP” and a true expert on collaboration, modern workplace and digital transformation. Talking to him got me thinking about all the project and task management tools Microsoft offers. On a quick count, I’ve been able to come up with D365 PSA, Project Online, Planner, Roadmap, all things Share Point Online and To-Do. I’m sure there are more.

My discussion with Vesku got me thinking about task management for personal tasks and how that relates to PSA. In every single PSA project I have been in, users have wanted to see their Resource Assignments and Bookable Resource Bookings in an easy way. While there are good ways of accomplishing that in Dynamics 365 PSA and with Power BI, those tools aren’t necessarily the go to-tools in everyday work.

Tasks are something everyone has and To-Do offers a pretty neat and straightforward way of handling them. This makes me think that when a person is assigned on a project task, information about the task and the related Resource Assignment could be easily presented on a To-Do task. Remember that this is just a single example. Planner or Exchange might be your cup of tea and that’s just fine.

Flow considerations

Before jumping in and dissecting the Flow that creates To-Do tasks from Resource Assignments, I want point out a few things. To begin with, it’s important to understand that To-Do tasks are personal. From a Flow point of view this means that a connection made to To-Do is to a user’s personal To-Do. If you are about to make a generic Flow to push data to To-Do, pause and take a minute to consider the results: If you connect to your own To-Do, every time the Flow fires off, you will have a task in your own To-Do. For this example that isn’t the goal as we want to push data to every user’s individual To-Do task list.

To overcome this, we want to make sure that the Flow only creates a To-Do task for a specific user being assigned to a project task. This means that each user has to have a Flow of their own that connects to the user’s own To-Do and creates tasks only when a created Resource Assignment is related to the user in question. So how do we actually enable this for the users?

As most organizations probably don’t want to give their users the Environment Maker security role to create Flows directly in their dev/test/prod, the default environment can be leveraged for users’ personal Flows. It’s a playground that is open to all users and a place where users can create Flows with connections to your different Common Data Service environments and D365 CE instances. Don’t forget to set up DLP policies. If a user creates a Flow and makes a connection to a CDS environment but doesn’t have a security role with sufficient privileges and access levels, the Flow will fail.

Sharing Flows will give access to shared connections and content within the connected accounts. Users might not be comfortable sharing a Flow accessing personal tasks with other users. To overcome this, a Flow can be exported and another user can then import the Flow and change the relevant connections and other details in the Flow to match their specific needs and use cases.

Image 1: Sharing a Flow.

From Resource Assignments to To-Do tasks with Flow

It’s now time to dive deeper to the Flow that creates To-Do tasks from PSA’s Resource Assignments. As the Flow fires off every time a Resource Assignment is created, we need a condition that checks if the Bookable Resource on the Resource Assignment is the owner of the Flow. This way To-Do tasks are created only when a Resource Assignment = Flow owner. This won’t prevent the Flow from firing off for all users that have this Flow created in the default environment, but it will not create incorrect To-Do tasks.

Get Project, Get Project Task and Get Project Team actions allow us to dig into additional details so that we can display some relevant information on the To-Do task. As I’m writing this blog post, I was unsuccessful in populating the To-Do task’s Start Date and Due Date fields with values, despite trying various different date/time conversions. I decided to display this data on the Body Content section of the To-Do task instead. This section can also be used to display a link to the project related to the Resource Assignment.

Image 2: Flow.

To test this Flow, I created it in the default environment for two users and in my D365 CE environment for myself. The images below illustrate what happens when a Resource Assignment is added and removed for John Doe.

Image 3: Adding John Doe as a Resource.
Image 4: Removing John Doe as a Resource.
Image 5: To-Do task for John Doe.

This brief blog posts has described steps to create To-Do tasks from Resource Assignments. As this Flow interacts with both business and personal data, remember to set up DLP policies and consider where users should deploy their Flows. In this example I have used the default environment as I did not want users to create Flows in my D365 CE environments. Also consider how many times a Flow fires off in a scenario like this. If 100 users have deployed this Flow and there are 100 daily Resource Assignments, the total number of Flow executions will be 10 000 per day.

Disclaimer:
All my blog posts reflect my personal opinions and findings unless otherwise stated.

Leave a Reply

Your email address will not be published. Required fields are marked *