- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 05:50 AM
Hello I am trying to create a ui policy on the hr_task table with the requirement that when the task is created a parent case field becomes mandatory so you cannot close the task until the parent field is filled.
the ui policy dot walks to the field from the parent field on the hr task record
And this is the script I am trying to run
The conditions to run are just based on some information from the task being populated.
I am getting the field message on the task but the parent tracking number is not being made mandatory and the task can be closed.
Any assistance would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 06:19 AM
Hi There,
You need to correct your code, tracking is no field in your table, so you can achieve this in two ways:
1. Scripting:
g_form.setMandatory('parent.u_tracking_numner',true); //Please mention the correct field name here.
2. Without scripting:
Just create a UI policy action and you should be able to achieve this functionality.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 06:19 AM
Hi There,
You need to correct your code, tracking is no field in your table, so you can achieve this in two ways:
1. Scripting:
g_form.setMandatory('parent.u_tracking_numner',true); //Please mention the correct field name here.
2. Without scripting:
Just create a UI policy action and you should be able to achieve this functionality.
Please mark this as correct and helpful if it resolved the query or lead you in right direction.
Thanks,
Mohit Kaushik
Community Rising Star 2022
Mohit Kaushik
ServiceNow MVP (2023-2025)