Hiding fields that have multiple UI policies?

thrsdy1512
Tera Expert

Hi I am trying to hide some fields on the change task form for a specific type of change. 
I have created a UI policy however see this error on the UI Policy Action for the fields:

thrsdy1512_0-1745840851795.png

My questions is:

1) Is it ok to proceed or will this cause further issues in the future 

2) is there a better way to customise the form layout and hide fields? They only need to be hidden for a specific type of change request. 

 

Thanks

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@thrsdy1512 

Responses inline

1) Is it ok to proceed or will this cause further issues in the future

-> it will cause issue going forward, you should see if there are any conflicting UI policies acting on same field. This will ensure your business requirement is satisfied

2) is there a better way to customise the form layout and hide fields? They only need to be hidden for a specific type of change request. -> don't touch form layout, ensure you use onload client script or UI policies to show/hide fields

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @thrsdy1512 

Actually, it’s time to rethink this approach:

I would not recommend proceeding further until you identify which policies have the same order number and need to be marked or kept as a priority. The first step is to review all existing UI policies on the same table and field and adjust the order.

Secondly, regarding the custom form layout, it’s okay, but users could potentially find a loophole and bypass the policy by changing the form view. It’s better to change the order first, and then consider the custom form layout as a second option.

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

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

Ankur Bawiskar
Tera Patron
Tera Patron

@thrsdy1512 

Responses inline

1) Is it ok to proceed or will this cause further issues in the future

-> it will cause issue going forward, you should see if there are any conflicting UI policies acting on same field. This will ensure your business requirement is satisfied

2) is there a better way to customise the form layout and hide fields? They only need to be hidden for a specific type of change request. -> don't touch form layout, ensure you use onload client script or UI policies to show/hide fields

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@thrsdy1512 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

@thrsdy1512 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

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