Hello, what I need is to have a custom field in the case entity that represents the total time derivative of all the activities for the case.
For example:
- telephone call, 1 hour
- appointment, 3 hour
So, for this case, total time equal to 4 hours should appear in the custom field.
Note that if the appointment is canceled, the total time should therefore be 1.
I wonder what is the best way to implement this customization so that the system maintains the total updated automatically.
If it is true that I could insert the custom code into the "on save" event for the activities entity - I do not know how to update the total when the user deletes the activity.
Do you have any idea as to suggest a solution to my needs?
Thanks in advance,
Luca