Question

How can I configure the system to count how many hours did every activity take?

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

Hello,

Your business purpose can be achieved with the help of the slight system development. To achieve it you need to:

  1. Go to the replaced Activity object and create a new numeric column there. Let's call it 'DurationInHours'.
  2. Open the object process and find ‘CalculateDurationOnSaving override void CalculateDurationOnSaving()’ there.
  3. 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