
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2019 01:52 AM
Hi all,
I have a client script onLoad to control display of a field based on GlideAJAX condition.
Also, there is a UI Policy Action controlling the 'Mandatory' feature of the same field, but Visible property is 'Leave Alone'.
Still, the setDisplay(True/False) doesn't have required affect.
So, does the UI Policy overwrite the client script even if selected 'Leave Alone'?
Then, how is 'Leave Alone' helpful at all??
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2019 02:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2019 02:06 AM
Hi Pranshu,
Client script runs first then UI policy will run at the end;
Leave Alone means do nothing based on the conditions
Leave Alone: Does not change anything about the visibility of the field (useful if different UI Policies can affect different properties of the field)
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2019 02:08 AM
... and you can't hide the field if it is set to mandatory.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2019 11:44 PM
Thanks for the replies, due to mandatory fields, the hide action in client script was not working.