Question
How can I configure the system to count how many hours did every activity take?
08:11 Feb 08, 2017
Hi,
I'd like to have the ability to display the duration of every activity in hours to be able to use this data in the dashboards afterwards. Is it possible?
File attachments
Like
1 comments
08:18 Feb 08, 2017
Hello,
Your business purpose can be achieved with the help of the slight system development. To achieve it you need to:
- Go to the replaced Activity object and create a new numeric column there. Let's call it 'DurationInHours'.
- Open the object process and find ‘CalculateDurationOnSaving override void CalculateDurationOnSaving()’ there.
- Add the following code:
base.CalculateDurationOnSaving(); Entity.DurationInHours = decimal.Round(decimal.Divide((int)Entity.DurationInMinutes, 60), 2);
4. Save and publish the object.
Best regards,
Lisa
Show all comments