- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 02:47 AM
Hey team,
Need a client script for below conditions
Then
output would be
currency -usd
country -US
also work not should be mandatory
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 04:17 AM
Hello @pramn
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 02:55 AM
so based on subcategory and Request type the other 3 values should be set or become mandatory?
what did you start with and where are you stuck?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 03:53 AM
need a client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 04:17 AM
Hello @pramn
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2023 03:00 AM
Hello @pramn
You need to use onChange Client Script :-
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if ( isLoading || newValue == '') {
return;
}
var subcat = g_form.getValue('sub_category');
var request = g_form.getValue('request_type');
if(subcat == 'US OTC...' && request == 'Payment Log'){
g_form.setValue('currency', 'USD');
g_form.setValue('country', 'US');
g_form.setMandatory('work_notes',true);
}
}
Plz Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.
Regards,
Samaksh