Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to count the number of time the State of the Incident Field sets to on-hold?

sashichand
Mega Expert

Hi All,

How to count the number of times the incident state sets to on-hold. And i want to send an email to caller whenever the state is on-hold along with the count.

**There is an OOB for Reopen count, is there anything similar to that we have.

How to achieve this, Kindly suggest.

Thank You

1 ACCEPTED SOLUTION

Hi,

 Just write before insert/Update BR with the condition as stae changes to on_hold and with that script,

var count =current.u_onhold_count;

 count++;

current.setValue('u_onhold_count', count);

View solution in original post

10 REPLIES 10

Thank you Swetha, That worked.