How to clear out On Hold Reason value after Incident State changes back to In Progress from On Hold

Roberta B
Mega Guru

We have a requirement that when an Incident ticket is in a State of 'On Hold and 'On Hold Reason' is 'Awaiting Caller', when the caller adds additional comments or respond back to an email notification to automatically change the State to 'In Progress'.  This is working.

However, after the Incident goes to 'In Progress' State, we cannot choose 'On Hold' state and 'On Hold Reason' of 'Awaiting Caller' again, because the 'On Hold Reason' still has the value in it, and when saving it flips back to 'In Progress'.

I believe the below script that is being used in the Business Rule is where I need to make a change, but I can't determine if that is the place to make a change.  And if so, what the change should be.  Or, if there is a UI Policy or something else I need to update?

find_real_file.png

 

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Roberta B
Mega Guru

Hello -

Thank you everyone for your ideas.  I finally got this working by the following:

1) Marked the [Move "On Hold" to "In Progress"] Business Rule from Active = true to Active = false
find_real_file.png

 

find_real_file.png

 

2) Added the following script to the 'Actions' of the 'Inbound Email Action' of [Update Incident (BP)]:
gr.state = 2;
if (gr.state != 3)
gr.hold_reason = '';

find_real_file.png

find_real_file.png

3) Added the following additional action to the 'Incident State Change to In Progress' Business Rule 'Actions':
Set field values of 'On hold reason' To 'None'

find_real_file.png

find_real_file.png

View solution in original post

17 REPLIES 17

Gaurav Shirsat
Mega Sage

Hello 

It's Just a Suggestion, Try writing another Business Rule.

Before, Update Business Rule :- 

with below conditions:-

find_real_file.png

find_real_file.png


Mark my Response as Correct or Helpful, if you find it Appropriate.
Gaurav Shirsat : ServiceNow Community MVP 2022
https://www.linkedin.com/in/gauravshirsat/

Hello @shloke04 & @Gaurav Shirsat -

I deactivated the 'Incident State Change to In Progress' and created a new one called 'Clear Out Incident On hold reason' as Gaurav suggested.  I'm still getting the same issue...not working.

 

Roberta

Here are the screenshots per my previous message from today:find_real_file.png

 

find_real_file.png

 

find_real_file.png

Why do you have the condition 'Created is Empty'? I see Gaurav has used it but I cannot see a case where Created is Empty. Especially on a business rule that is only running when the record is updated.

Perhaps test the business rule after taking out this condition. If it still isn't working, I will test this scenario again on a PDI. Maybe it will just be easier to use a FLOW instead.

Hope this helps.

Please mark my answer as Correct/Helpful based on impact

Regards,

Dan H

 

I thought of that too, and removed that condition, and still no luck.

 

I'm also taking a look at all our BRs to see if there are clashing rules.