BPF Stages Tracking Time

Introduction

 
For a selected project record in Project Service Automation, if the customer needs to find the details of the time spent in a stage during the stage process of BPF, we can achieve this with the help of an Out-of-Box Workflow and a custom entity, roll up fields and calculated fields.
 

Implementation

 
To implement this solution, we use:
  • Custom Entity to store Stage Entry, Stage Exit, Duration, Project, Primary Name all as roll up fields.
  • Calculated Fields[Duration]
  • OOB Workflow
  1. Spin up a trial instance with the PSA module [https://trials.dynamics.com].
     
  2. Create a custom Entity ProjectStageTracker with the following fields and datatypes

    BPF Stages Tracking Time
  3. Fields to be created with the following data types

     BPF Stages Tracking Time

  4. Duration Field to be created as calculated Field as shown in the below screenshot

    BPF Stages Tracking Time

  5. And Click on Edit for Duration Field and give criteria as follows 

    BPF Stages Tracking Time

  6. BPF Stages Tracking TimeKeep all the above fields in a Form in the newly created entity as shown below

  7. Create an OOB realtime Workflow on BPF Entity Project Stages, as shown below:

    BPF Stages Tracking Time

  8. BPF Stages Tracking Time for process changes, select the field, as shown below

    BPF Stages Tracking Time

  9. And Add Step – Select Create and select Custom Entity Project Stage Tracker and set properties as shown below

    BPF Stages Tracking Time

  10. BPF Stages Tracking TimeNow Activate this workflow, select a project record, and change a stage and observe a record gets created in the custom entity, as shown in the below records:

    BPF Stages Tracking Time
Note
We can also do the above implementation with a Background workflow along with a wait condition:
  1. Calculated & Roll Up Fields: https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/calculated-rollup-attributes
  2. Workflow: https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/customize/workflow-processes

Conclusion

 
In this way, with the help of Out-of-Box Features in CRM, we can achieve this functionality with a zero-code/no-code solution.