- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 02:47 AM
Hi Guys,
Am new in ServiceNow Implementation. I realize that whenever argent added the additional comments, the state need to be manually change to On Hold ,On hold reason: awaiting caller.
I have created a business rule as below:
When
additional comments :changes
State is New or In Progress
Assignment Group: Servicedesk Team
Actions
Set field value State to "On hold
On Hold reason :Awaiting Caller
Thing to be achieved: Whenever Argent add comments, the State will automatic change to State On Hold , Reason Awaiting Caller.
Thank you in Advance !
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 03:21 AM
Hi @Yee Man Chun ,
Use create after business rule and check Update on When to run Tab. use below script
Script:
(function executeRule(current, previous /*null when async*/) {
current.state='3'; //on hold backend value out of the Box On hold state value is 3
current.hold_reason='1'; //hold reason backned value. out of the Box Awaiting Caller hold resoan is 3
current.update();
})(current, previous);
Refer below screenshots.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 03:21 AM
Hi @Yee Man Chun ,
Use create after business rule and check Update on When to run Tab. use below script
Script:
(function executeRule(current, previous /*null when async*/) {
current.state='3'; //on hold backend value out of the Box On hold state value is 3
current.hold_reason='1'; //hold reason backned value. out of the Box Awaiting Caller hold resoan is 3
current.update();
})(current, previous);
Refer below screenshots.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 05:23 AM
Hi Pavankumar4,
The state has change to On hold . However the reason of Onhold is still selected "None".
Also would like to ask the On Hold , awaiting caller can only been used once in a incident? I realize Once i changed to on hold awaiting caller in the additional comment added(1st time). On the following 2nd and 3rd even i manualy selected to on hold , awaiting caller it will automatic change to in progress after i update the comment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 10:03 PM
Hi @Yee Man Chun ,
As I shared comments in code you need to give the correct backend choice value of On hold reason field.
To check the values right click on the field and configure open the dictionary.
Refer below screenshots.
You need to provide your choice value in above you can see for Awaiting Caller value is 1.
if you provide correct value for On hold reason it will update.
Once it is automated why you need to select manually.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2022 11:56 PM
Hi @pavamkumar4,
I think i follow exactly the same as what you mentioned but the status will only change to on hold , reason (none). Could you help me double check if i did anything wrong?