State of problem form changes to close on form even though script prevent state from changing state

jthomsen
Tera Contributor

I have a script that prvents a problem from changing from the state resolved to closed when there is no related problem task or change. The script works fine, but the state on the form changes to closed until I reload the form and the state goes back resolved. Is thereany solution to this problem, as I don´t really want to tell my client that he needs to reload the form to actually see that the script is working and prevents the problem to change it´s state to closed.

10 REPLIES 10

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @jthomsen 

 

I guess some other UI policy / client script running on form,, which set the state as resolved and when you relaod, from Server the validation get failed it revert to the previous state. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Hi @Dr Atul G- LNG I don´t have anything running that set´s the state to resolved. The use case is, that the user manually clicks to close the problem, but the business rule script that I have running prevents him from closing the problem, because there is no problem task or related change, yet the screen still says closed on the state until I reload the form and the state changes back to resolved.

Hi @jthomsen 

 

This is expected behaviour, if I am not wrong. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Is there any way t fix the behaviour?