Dynamics 365 Project Service Automation: Marking a Project Task as Complete to prevent Time Entries

Tested on:
Dynamics 365 version 9.0.2, PSA solution version 3.x, Unified Interface

A subject that comes up frequently is marking Project Tasks as Complete to prevent Time Entries to those tasks. As Dynamics 365 Project Service Automation doesn’t have this functionality out-of-the-box, we have to do some customizing to achieve this goal. This brief blog post will cover the basic steps to build this functionality. Note that this has been built and tested on V3 of PSA on the Unified Interface.

1. Add Project Tasks to the sitemap

The Project Task entity isn’t on the sitemap by default so it needs to be added on it. Remember to add it to the sitemap for Project Service.

2. Add an Option Set

Add an Option Set with Yes/No as options and place the field on the Project Task main form.
Edit: I received a very good suggestion from John Burrows at Microsoft about making fields required for scheduling as read only. There are sacred fields on the Project Task entity which should not be changed. Personally I would not change values in any of the OOTB fields unless there is a very good reason to do so. Tasks should primarily be edited from a Project’s Schedule (WBS) so editing Project Task records directly should in general not be necessary, unless a task is being marked as Complete.

3. Add a new view

Add a new view that has the field from step 2. Remember to add the view on the Project Service Model-driven app by using the App Designer.

4. Create a real-time workflow on Time Entry entity

A real-time workflow will prevent Time Entries for being submitted if the field created in step 2 has a value of Yes. In this example the workflow is fired off before the Entry Status field changes.

5. Test the customizations

Let’s open a Project Task and set the field created in step 2 to Yes. When Time Entries are submitted against that task, the workflow cancels our action. Journal Lines or Project Approvals are not created and the Time Entry’s Entry Status remains Draft.

I hope this brief blog post gives you an idea on how to mark Project Tasks as Complete and prevent Time Entries for those tasks.

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 *