How to start or pause or stop a timer field through a script?

harsha328
Tera Contributor

Hello,

I am trying to calculate the time an incident is in a particular state. I have added a timer field to the incident record. The timer should start running if the state of incident is either 'awaiting evidence' or 'awaiting user info' and should be paused if it's neither of the formerly mentioned states. My idea is to do this using a business rule, but I have no idea of how to start or pause a timer field through a script.

How do I achieve this?

Thanks in Advance,

Harsha

1 ACCEPTED SOLUTION

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,



You can have a metric definition it will give you for how many time it was in one of the state.



See Metric definition, there are some OOB definitions available for this purpose


View solution in original post

10 REPLIES 10

Sorry, My bad, I didn't notice that. It displays the number in ID field