- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 06:54 AM
I have a question around Resolution codes on a case and the client wants the below codes which I have configured on the choices dropdown below.
The client wants another option called ‘Resolved’ which is the default value and not part of a label. So i guess here in this situation, when the case state is ‘New’, ‘Open’ and ‘Awaiting Info’ the default value of the resolution code will stay as ‘--None--’, however when the case state changes to resolved, the Resolution code defaults to ‘Resolved’. How can i do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 07:02 AM
Writedown onchange client script on case table as below :-
Script :-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue=='6'){
g_form.setValue('resolution_code','10'); // Replace your resolution code backend value in place of '10'. You will get that from configure dictionary - scroll down to choices
}
}
Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 06:58 AM
hello @Daniel R2 ,
You can write n on change client script on the state field and you can set the value of the resolution code based on the state
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue=="your_reolved_choice_value")
{
g_form.setValue('your_resolution_code_field_name','resolved_state_choice_value');
}
}
Hope this helps
Mark the answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 07:02 AM
Writedown onchange client script on case table as below :-
Script :-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
if(newValue=='6'){
g_form.setValue('resolution_code','10'); // Replace your resolution code backend value in place of '10'. You will get that from configure dictionary - scroll down to choices
}
}