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
- Spin up a trial instance with the PSA module [https://trials.dynamics.com].
- Create a custom Entity ProjectStageTracker with the following fields and datatypes

3.Fields to be created with the following data types

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

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


6.Keep 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:


8.for process changes, select the field, as shown below

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


10.Now 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:

Note :We can also do the above implementation with a Background workflow along with a wait condition:
- Calculated & Roll Up Fields: https://docs.microsoft.com/en-us/dynamics365/customerengagement/on-premises/developer/calculated-rollup-attributes
- 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 zero-code/no-code solution.
excellent
LikeLike