Need a script, can anyone help please

jayaprakash1998
Tera Contributor

If Incident state is marked as on hold and on hold reason as "Awaiting problem" and if user save the form without associate a problem record, then send an alert message to the user.

2 ACCEPTED SOLUTIONS

jonsan09
Giga Sage
Giga Sage

You should be able to accomplish the ask with a Business Rule. You'll want to check advanced, make it a before BR. Set your conditions and on the actions tab select abort and add message. See below screenshots
2023-09-08 15_09_41-New Record _ Business Rule _ ServiceNow.png

 

2023-09-08 15_10_08-New Record _ Business Rule _ ServiceNow.png

 

View solution in original post

Siva Jyothi M
Mega Sage

Hi @jayaprakash1998,

 

You can achieve this through UI Policy, write a UI policy like below on Incident table.

SivaJyothiM_0-1694231603954.png

And you can write the alert in the Execute if true like below.

SivaJyothiM_1-1694231678403.png

And when ever you try to change the state to on-hold and the on-hold reason is Awaiting problem, It will show the alert on the Incident like below.

SivaJyothiM_2-1694231785820.png

If you want the problem field also to be mandatory, you can write UI policy action under this making the problem field mandatory to true.

 

Mark this answer as correct and helpful if it solves your issue.

 

Regards,

Siva Jyothi M.

 

View solution in original post

5 REPLIES 5

Thankyou @Siva Jyothi M 

 

Regards,

Jayaprakash