facing issue with Ui Policy

nameisnani
Mega Sage

Hi Team , 

 

 

under closure information ,  I have created 2 custom fields . please check screenshot .

nameisnani_0-1720591376318.png

 

when we click on ' COMPLETE' or States changes to ' closed ' these two custom become mandatory .

nameisnani_0-1720591647635.png

 

 

I have created UI Policy for this ,

nameisnani_1-1720591731599.png

 

But it is not working 

nameisnani_2-1720591794485.png

 

 

can anyone please help me here ... what was the mistake here . please provide steps .

 

.

 

8 REPLIES 8

Hi @nameisnani,

You need to write this script here.

Yashsvi_0-1720594381243.png

Thank you, please make helpful if you accept the solution.

nameisnani
Mega Sage

Hi @nameisnani 

 

I can see your UI policy is not Active.

Once making it active, select the Script tab near When  to apply.

Then check the Run Script check box under which you will be able to write the script.

 

Please make helpful if you accept the solution.

 

Thanks

Sanjana

Mark Manders
Mega Patron

Can you stop posting the same questions several times. People are giving you the same answers others have already given, without them knowing what you did or didn't try. You are not just wasting your own time and will loose track of the answers, but also of the people that are spending their own time to help you. 

If for any reason you want to post the exact same question again, because you aren't getting anywhere, close the previous one and add the already given (not working) solutions to the new question so there is a clear overview of what already was done.

https://www.servicenow.com/community/developer-forum/facing-issue-with-ui-policy/td-p/2985667

https://www.servicenow.com/community/developer-forum/ui-plocy-is-not-working/td-p/2985805

https://www.servicenow.com/community/developer-forum/1-ui-plocy-is-not-working/td-p/2987070

 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark