- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 06:55 PM
I want to auto-assign the cases to the Assignment Group (A) based on the HR Service(B). I created below onLoad client script but it doesn't work:
function onLoad() {
var st = g_form.getValue('hr_service');
if(st == 'B'){
g_form.setValue('assignment_group','A');
}
}
Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 07:04 PM
Hi Masoud,
Try
function onLoad() {
var st = g_form.getValue('hr_service');
if(st == 'B' || st == 'b'){
g_form.setValue('assignment_group','PASS SYSID OF ASSIGNMENT GROUP A HERE');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 07:21 PM
I tried with sys id but it didn't work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 07:34 PM
Can you put an alert i.e alert('in'); after if loop and confirm if the loop is working?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2020 07:46 PM
Yes, the loop is working!
function onLoad() {
var st = g_form.getValue('hr_service');
if(st == 'B' || st == 'b' ){
g_form.setValue('assignment_group','77ee8edbe71....');
}
alert('in');
}