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
-
Fields to be created with the following data types
-
Duration Field to be created as calculated Field as shown in the below screenshot
-
And Click on Edit for Duration Field and give criteria as follows
-
Keep all the above fields in a Form in the newly created entity as shown below
-
Create an OOB realtime Workflow on BPF Entity Project Stages, as shown below:
-
for process changes, select the field, as shown below
-
And Add Step – Select Create and select Custom Entity Project Stage Tracker and set properties as shown below
-
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 a zero-code/no-code solution.