- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 07:47 AM
Hi Community,
I want to set assigned to field with one user name(Able Tutor) on particular condition else assigned to field will be mandatory.
Condition: Short description is Application support assigned to field need to set with Able Tutor.
else assigned to will be mandatory.
We can achieve this with client script or ui policy but not sure how i will prepared script for this.
Any one help on this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 08:43 AM - edited 06-08-2023 08:44 AM
You can use below code in a client script for achieving your requirement
if (g_form.getValue('short_description') == "SSO Application Integration") {
g_form.setValue('assigned_to', '62826bf03710200044e0bfc8bcbe5df1'); //sys_id of Abel Tuter
} else {
g_form.setMandatory('assigned_to', true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 08:43 AM - edited 06-08-2023 08:44 AM
You can use below code in a client script for achieving your requirement
if (g_form.getValue('short_description') == "SSO Application Integration") {
g_form.setValue('assigned_to', '62826bf03710200044e0bfc8bcbe5df1'); //sys_id of Abel Tuter
} else {
g_form.setMandatory('assigned_to', true);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-08-2023 08:47 AM
Keep in mind that the assignment group should be populated before filling Assigned to and assigned to user should be part of group selected. I am assuming you are doing those validations already before running code shared