Dynamics 365 Project Service Automation: Project Team Member Role to Time Entry with Flow

Tested on:
Dynamics 365 version 9.1, Project Service Automation solution version 3.1, Unified Interface

When a new Project Team Member record is created, a Role is chosen for the team member. This doesn’t mean that the same Role has to be used when submitting Time Entries as Dynamics 365 Project Service Automation allows a user to submit Time Entries for any defined Role. A requirement that occasionally pops up is to restrict Time Entries when a Role selected on a Time Entry is different from the one that is set on the related Project Team Member record. In other words if John Doe is set as a Consultant on a Project’s Project Team Member record and he selects a Role of Developer on a Time Entry, submitting that entry should not be allowed.

Now that we have defined the requirement it’s time to implement it in PSA using a no-code approach. We can pull a Bookable Resource’s Role from the Project Team Member record of the related Project and display it on a Time Entry record by using Flow. A real-time workflow prevents Time Entries if the Role set on Project Team Member is different than the Role set on a Time Entry. To achieve all this we need a lookup to the Bookable Resource Category entity on the Time Entry form, a real-time workflow and a Flow. Let’s go through the steps to build the functionality:

1. Create a lookup to Bookable Resource Category and place it on the Time Entry form.

2. Create a real-time workflow that stops the workflow as canceled if Role on Time Entry is different than the Role populated in the lookup field. The lookup is populated using the Flow in step 3.

3. Create a Flow that populates the lookup in step 1 when a Time Entry is created. The Flow goes through all Project Team Member records related to a Project. It populates the lookup on Time Entry when a Bookable Resource on the PTM record matches the Bookable Resource of the created Time Entry.

With these three simple steps we can tackle a requirement around Time Entries with Flow and without using code. As always, you can get this Flow from the Those Dynamics Guys PowerApps Bank here.

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 *