UI policy (not working) and Data Policy (Working)

Andi Hoxha
Tera Contributor

Hello, I am trying to make fields attestation and attestation group readable only when the state is attested. However, when I applied UI policy is not working. The only thing that seems to be working is the data policy(used as UI policy on clients). Can someone help me understand what is the reason that the UI policy is not working for my case to make the fields readable.

Below I have attached a screenshot of both of them.

UI policy:

forum ui policy 1.png

Data policy:

data policy forum 1.png

I also tried to investigate online and if the issues found there would be similar with mine. So far I have no idea why that UI policy is not working. Only thing I realised is when I used client script it did not work as well.

 

2 ACCEPTED SOLUTIONS

ersureshbe
Giga Sage
Giga Sage

Hi, I recommend to check with the UI Policy order.  The fields are mentioned under UI Policy action may used some other UI policies and order will be the same.

Regards,
Suresh.

View solution in original post

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

Just to be sure the fields are not getting read only on list or form? If it is list view UI policy does not work in list view.

 

If it is form view check if there are any other UI policy on the same field? also try to make the order of the UI policy 1000.

 

Please mark my answer as correct based on Impact.

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@Andi Hoxha 

So you created data policy and are using it as UI policy also?

OR you have separate UI policy and data policy?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

So, first I created a UI policy. I tested it but it did not work. Then I created a data policy(use as a UI policy) and it worked. Also, I switched to the false data policy to test it with the UI policy only but it does not work. 

Community Alums
Not applicable

Can you put an alert in run scripts box (execute if true) in an UI Policy and see if you are getting that alert on form?

So, I tested it. The alert works fine just that part where is supposed to be readable does not work.

UI polocy 2 forum.png