top of page
  • Sebastian Sieber

#3 - D365 Project Operations Advent Calendar: Enable Project Templates for Project Operations

Updated: Dec 17, 2023

Welcome to day three of the Project Operations Advent Calendar project. Already curious about what we will find today? Let's find out🎅🏼

number 3 on christmas like background

Project Templates in Project Operations

Recurrent Project Structures, Industry Standards, and Common Practices for your project work - we see a lot of different use cases using templates. Not only to standardize processes and operations.

In case you have a background in Project Service Automation, you're may aware the Project Templates features got dropped with the upgrade to Project Operations.

Primary because of the Project for the Web integration - the functionality was not yet there and I currently do not even know what happens here next 😁

Still, it's one of the most common requirements on the market. How can it be achieved?

Copy Project Action

Microsoft offers us a Copy Project Action. This is the action also available in the ribbon of the projects via "Copy Projects"

project form with copy project button

But you can also trigger that option using flows or plugins. You can also check here the Microsoft Docs article which explains that pretty well.

In a real-life scenario searching for a project you want to copy (and having access to this project) might be a challenge. So, how can we reach a smoother implementation?

Option A) Copy any existing Project

Here we more or less re-use the Microsoft approach. Set up a Relationship on the Project itself in order to link the source project to your project. Via flow, you are able now to trigger the the copy project action on update (your target project needs to exist for the flow to execute).

In case you don't want to set up the relationship between the Projects you can handle the procedure via e.g. custom page.

new relationship for projects

Option B) Set up Project Templates

To set up Project Templates in your environment, you only need to extend the Project table with one additional flag, e.g. "Is Project Template". The default setting is "No". Create new Projects with the flag equal "Yes" for the Templates you want to have in your System, including the desired task plan.

Projects with the "Is Project Template" = Yes you want to exclude from your views and filter around the system and create separated views. Just to make sure the dedicated Projects don't light up for the users by accident.

For additional security feel free to add a field security profile on the field - so e.g. only Administrators are able to create templates.

Linking the Template Projects to your new Projects works in the same way as in Option A) - set up a relationship for the Project table or e.g. set up a custom page.

new column to define projects

enable column security

How to trigger the Flow?

For both scenarios the Flow (Power Automate) looks quite similar. Let's create the Flow together

create new flow

Add a new Cloud flow to your solution - always work with solutions in any case of customizations.

create new flow - select trigger

As a trigger, we select the dataverse connector "When a row is added, modified or deleted", provide a name and click on create.

For the trigger we select the "Modified" change type, of course, we want to work with Projects and select our recently created project lookup. In this case, when the Project Template gets linked to our project, our flow will trigger.

create new flow - define trigger

As the next step add the Dataverse Step "Update a row" and select Projects again and the ID of our Project. Here we want to update the Status Reason of the target Project to "Project copying". This is required in the Project Operations process

create new flow - update row - set Project copying status

Search for the Status Reason option in the Advanced Options and set the lookup to "Project copying"

create new flow - update row - set Project copying status

Now we want to trigger the Microsoft action. This works via "Perform a bound action" - again via the Dataverse operator.

Perform a bound action to trigger the copying

Select Projects as a table and now you can choose between version 3 and version 4 of the Copy Project action

select version of action

When to use CopyProjectV3?

Use version 3 if you want to overtake custom fields and further information from the template besides the Project Plan. You're able to overtake named resources, but for a template use case that might be not the scenario.

In contrast, you want rather set the option (on the bottom of the dialog) "ClearTeamsAndAssignment" so you receive the project plan only and can start with resource staffing.

Important: Only set one of these two options to yes - both would be contrary.

When to use CopyProjectV4?

As for now version 4 offers some new capabilities to map named and generic resources. With the flag "TeamMemberOption" you can define if and how team members should be copied:

  • 0 - Do not copy team members.

  • 1 - Copy team members as generic resources

  • 2 - Copy team members to specified named or generic resources

In order to map team members from our template it's necessary to set up a mapping in "TeamMembers" and "TeamMembersMapping". Also not really practical for our scenario because it would require a fixed mapping.

In our scenario lets pick version 4, also because it's new and new is always better 😁

definition for version4

For Row ID you want to select the Project ID of your current project.

Team Member Option we set to Value 1 - to receive as well generic resources with our project plan.

Source Project links to the Template Lookup. Add here the text "/msdyn_projects/" before the value because it expects a URL expression.

As a final step, after copying our tasks plan information, we only want to set the Status Reason from "Project copying" to "Active". Again with the Update Row step as previously seen:

update row - set project status reason to active

update row - set project status reason to active

Et voilà - that's it! Save the flow and enable the same and you are ready to go. I will post the full flow details below again.

As mentioned there is also the option to build a custom page that can add some value to the user experience - similar to this:

example custom page

example custom page

Please let me know if you would be interested in a guide to set up the custom page for this or a similar scenario - for today it would have been too much 😇

Hope you like these new small episodes. I can't wait to explore more with you tomorrow! 😊

And here is the full flow we created:


bottom of page