To make additional comments mandatory when state set to canceled (should run in both views)

rishabh31
Mega Sage

Dear Team,

 

In the Incident record, when the field State is set to 'Canceled', then want to make the field 'Additional Comments (comments)' mandatory and restrict the form submission/updation/save and throw an error message at top.

 

This should work in both views (Portal view and Standard form view)

 

I tried through client scripts, UI Policies but no luck.

 

Kindly help with the steps and script to get this resolved.

 

Thanks

 

 

17 REPLIES 17

Hi @rishabh31 

 

Please check the links I provided , it has solution of your problem.

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

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

@Dr Atul G- LNG Sir, I checked and thanks for same but the issue ii allows me to save/submit/update that respective record. Per requirement, it should restrict submission and throw errors at the top like 'Mention the reason for cancellation in Additional comment'.

 

 

Yes, for that need to update UI Action as well, so check the validation.

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

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

Anubhav24
Mega Sage
Mega Sage

Hi @rishabh31  ,

Please post the UI Policy screenshot.

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @rishabh31 

 

It will not work in native view, you make to some changes as suggested

 

https://www.servicenow.com/community/incident-management-forum/mandate-additional-comments/m-p/24870...

 

2nd, why you need additional comments mandatory at Portal?

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

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