How to debug UI Policies or UI Policy Actions in ServiceNow Next UI

Not applicable

Hi All,

 

Please provide the detailed steps or documentation where I can look how to debug the UI Policy in Next UI (Sandiego Version).

 

Thanks,

Raghu

1 ACCEPTED SOLUTION

kamlesh kjmar
Mega Sage

Hi @Community Alums ,

 

This is officialy documented that Field watcher and Javascript debug window is not supported with Next Experience in Sandiago and onwards.

KamleshKumar3_3-1668589442878.png

 

 

You can debug UI policies using below method:

 

1. Open module debug UI policies

 

KamleshKumar3_0-1668589129370.png

 

2. Now open the form that you want to debug. right click on the form and open inspect option

 

KamleshKumar3_1-1668589250982.png

 

 

3. In the console, you will see all the UI policies working on your form and what changes it is doing to which field.

 

KamleshKumar3_2-1668589341164.png

 

4. Once you are done with your testing, open stop debugging module and it will close the debugging

kamleshkjmar_0-1668589862125.png

 

 

 

I hope this helps.

 

Please hit helpful if this helps and Accept if this solves your issue.

 

Regards,

Kamlesh

 

View solution in original post

6 REPLIES 6

Umm.. ok, this works, thank you... however...

xiaix_0-1779485042511.png


What am I supposed to do with that info?

Gee whiz ServiceNow, thank you so much for telling me "GlideFieldPolicy: Setting "disabled" to "true" on "visible_summary" field".  Sure would be nice to know WHAT ui policy is applying it though!

On my own testing (no thanks to any debug logs), I figured out that

GlideFieldPolicy:   Setting "disabled" to "true" on "visible_summary" field

is being caused by the OOB Data Policy "visible on summaries readonly" (sys_data_policy2.do?sys_id=f8a41953c7610010d67edc8703c2609a)

 

and the 

 GlideFieldPolicy:   Setting "visible" to "false" on "visible_summary" field

is coming from the OOB UI Policy "Hide visible on summaries if type is HTML or RichText Label" (sys_ui_policy.do?sys_id=c432f0903703300054b6a3549dbe5def)

 

Again, would be nice if the debug log actually gave that info. ¯\_(ツ)_/¯