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.

Unable to make additional comments mandatory when incident state is cancelled

Sachin G K1
Kilo Sage

Unable to make additional comments mandatory when incident is cancelled.

However info message "hello" is showing.

SachinGK1_0-1704826109383.png

 

1 ACCEPTED SOLUTION

Hi @Sachin G K1 

 

The potential reason is you need to update the UI action as well. I had similar post earlier as well, and same point was suggested. 

 

Also check OOTB

 

LearnNGrowAtul_0-1704964185891.png

 

 

to verify the issue.

*************************************************************************************************************
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]

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

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Use UI policy @Sachin G K1 

 

Straight forward, and no code required. 

*************************************************************************************************************
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,

I tried UI Policy as Jayanth suggested below, it didn't work as i expected. I changed the state field but additional field didn't become mandatory. However additional field becomes mandatory after i save the record.

I don't want that, i want to make additional field mandatory when i change incident state to cancelled even before saving.

1.Before Saving form

SachinGK1_0-1704962199100.png

2. 

SachinGK1_1-1704962394454.png

 

Jayant_M
Kilo Sage

Hi Sachin,

As Atul says you can use UI policy for this using the following conditions

Jayant12_0-1704829705196.png

and if you want to run the script, try as shown below

Jayant12_1-1704829758829.png

 

Please mark my response helpful if it resolves your issue

Hi @Jayant_M , 

I tried UI Policy as you suggested, it didn't work as i expected. I changed the state field but additional field didn't become mandatory. However additional field becomes mandatory after i save the record.

I don't want that, i want to make additional field mandatory when i change incident state to cancelled even before saving.

1.Before Saving form

SachinGK1_2-1704962429476.png

 

2. 

SachinGK1_3-1704962429477.png