How to ensure that the field is not affected by any client-side controls.

AdivyaJ
Tera Contributor

Hi everyone,

I'm trying to prevent a field (specifically priority on a custom medication table) from being affected by client-side logic, such as UI Policies or Client Scripts.

I've come across undocumented attributes like:

  • ignore_control=true

  • client_script=false

However:

  • Neither of these are listed in official ServiceNow dictionary attribute documentation.

  • ignore_control seems to be informally referenced, but doesn't appear to be a supported or reliable solution.

  • client_script=false seems to work in some cases, but again, it's not officially documented, so I'm concerned about using it in production environments.

My Questions:

  1. Are these attributes (ignore_control, client_script=false) safe or supported for use in ServiceNow (preferably confirmed via documentation or staff)?

  2. Is there an official or supported way to make a field ignore client-side controls, such as making it unaffected by UI Policies or Client Scripts?

  3. If not, what would be the recommended best practice to achieve this behavior?

Thanks in advance for any insights or guidance!

2 REPLIES 2

Bhimashankar H
Mega Sage

Hey @AdivyaJ ,

 

There is no official, built-in option in ServiceNow that allows you to make a specific field fully immune to all client-side controls such as UI Policies or Client Scripts. Both UI Policies and Client Scripts are designed to manipulate form fields dynamically, and any field on the form is, by default, subject to their logic.

 

Unlike Access Control Lists (ACLs), which are server-side and can block changes regardless of client logic, there is no attribute or configuration to instruct the client to “ignore” changes for a given field

 

You may think of ACLs, Limit client-side controls, minimize conflicting logic, etc.

The only supported and robust way to enforce write protection is with ACLs at field level.

 

For more detail go throw below references

ACL prevents a client script from running , prevent changing values - Client Script , Skip UI Policy , Restrict Field with Script 

 

Thanks,
Bhimashankar H

 

-------------------------------------------------------------------------------------------------
If my response points you in the right directions, please consider marking it as 'Helpful'/'Correct'. Thanks!

Bhimashankar H
Mega Sage

Hi @AdivyaJ ,

 

I hope you saw my reply. 


If my answer helps you or resolves your query, please consider marking as 'Accept As Solution'. So future readers with similar questions can find it easily. Your coordination will help community to grow stronger!.

Thanks,
Bhimashankar H