PoonkodiS
Giga Sage

@dellyou088 

UI Policies override Client Scripts: UI Policies always execute last and win any conflict.

Mandatory wins over Read-Only: ServiceNow never allows a field to be both. It prioritizes mandatory so users can still enter data.

The Result

When Empty: The UI Policy forced the field to be mandatory, overriding the Client Script's read-only rule.

When Filled: The UI Policy stopped acting, allowing the Client Script to successfully make the field read-only.

Best Practice

Delete the Client Script and use one UI Policy with the condition Field A is not empty to handle both states automatically.

View solution in original post