- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 05:45 AM
Hello
I am trying to make description field mandatory for that i have created the UI policy and checked incident by loading them after that description field got mandatory but within a second it was un mandatory by the system automatically, do you have suggestion on this issue why the system is make them un mandatory, Please let us know your suggestion.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 06:11 AM - edited 11-26-2024 06:13 AM
Hi @Naga19,
Using a UI Policy to make a field mandatory is the right way to go... so you're on the right track. (Not only that - it's best practice).
UI Policies are the last thing to load on a form so you can rest assured it's not a conflict between any existing client scripts, however, there could be other UI Policies conflicting (Or other scripts).
First thing to check for testing purposes, is to set the 'Order' column value of the UI Policy to 9999 to ensure it's loading last and confirm the results - this is a temporary measure just to help see if there is a conflict. Not only that, the UI Policy should tell you that there'[s a conflict on the same field)
I would also strongly recommend using the Script Tracer which show's you exactly whats running on the form on load - this will show all scripts, UI policies, Business Rules etc which will help diagnose where the issue is.
Simply type 'Script tracer' into the Navigation menu and click on the link. This will open a new window. Click on 'Start tracer' and then go back to your window and open up the Incident form. Once opened you can go back to the Tracer window and see what's running.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 06:03 AM
Hi @Naga19 ,
Check if any other UI policy or client script running for same field to make non-mandatory.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 06:03 AM
Hi @Naga19
Please check whether description mandatory thing if any client script is written.
Please appreciate the efforts of community contributors by marking the appropriate response as the correct answer and helpful. This may help other community users to follow the correct solution in the future.
********************************************************************************************************
Cheers,
Prashant Kumar
ServiceNow Technical Architect
Community Profile LinkedIn YouTube Medium TopMate
********************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 06:08 AM - edited 11-26-2024 06:09 AM
Go to the sys_ui_policy_action table and search for Field Name = description.
That will show you if there's any other UI Policies taking action against that field.
Make sure you're searching where table = whatever table you're on OR table = task. There's a small possibility someone made a UI Policy for Task that also applies to child tables.
You'll also want to go to your client scripts and search for Script contains description.
You have to search in both places otherwise no way to be sure.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-26-2024 06:11 AM - edited 11-26-2024 06:13 AM
Hi @Naga19,
Using a UI Policy to make a field mandatory is the right way to go... so you're on the right track. (Not only that - it's best practice).
UI Policies are the last thing to load on a form so you can rest assured it's not a conflict between any existing client scripts, however, there could be other UI Policies conflicting (Or other scripts).
First thing to check for testing purposes, is to set the 'Order' column value of the UI Policy to 9999 to ensure it's loading last and confirm the results - this is a temporary measure just to help see if there is a conflict. Not only that, the UI Policy should tell you that there'[s a conflict on the same field)
I would also strongly recommend using the Script Tracer which show's you exactly whats running on the form on load - this will show all scripts, UI policies, Business Rules etc which will help diagnose where the issue is.
Simply type 'Script tracer' into the Navigation menu and click on the link. This will open a new window. Click on 'Start tracer' and then go back to your window and open up the Incident form. Once opened you can go back to the Tracer window and see what's running.
To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.
Thanks, Robbie