- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 04:10 AM
Hello All ,
I have a requirement , where I need to make the assignment group mandatory field and also when the assigned_to value changes the assignment group should become empty and it should become mandatory again.
Can anyone help me how I can configure this on the client side.
Thank You in advance !!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 06:11 AM
Hi,
is the field on form or not?
please share client script screenshot
if that doesn't work then use this normal client script on sc_req_item table
function onLoad(){
var itemName = g_form.getDisplayBox('cat_item').value;
if(itemName == 'Your Item 1'){
g_form.setMandatory('assignment_group', true);
}
}
Regards
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
04-06-2021 05:05 AM
Hi
How Can I implement this script for the catalog item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 05:31 AM
you can use Catalog Client Script of type onLoad for your catalog item and then make field mandatory
It applies on Requested Item Only
Regards
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
04-06-2021 06:00 AM
-- I have used the below onLoad client script -- and applied it to the RITM , but it doesnt show any result , it doesn't make the assignment group mandatory
Script :
function onLoad() {
g_form.setMandatory('assignment_group', true);
}
-- Can you please help me how to resolve it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2021 06:11 AM
Hi,
is the field on form or not?
please share client script screenshot
if that doesn't work then use this normal client script on sc_req_item table
function onLoad(){
var itemName = g_form.getDisplayBox('cat_item').value;
if(itemName == 'Your Item 1'){
g_form.setMandatory('assignment_group', true);
}
}
Regards
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
04-06-2021 06:31 AM