Hide impact choice when caller is vip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 01:58 AM
Hi All
If the caller of incident is a VIP user then Impact choice "VIP User" should be visible otherwise not visible.
Could you please help me on this to get the proper solution.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 02:58 AM
hi @Mani60
here are the steps,
go to UI Policy
1) select table (incident)
2) give condition as below
3) write a script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2024 02:59 AM
Hello @Mani60 ,
Please try below On Change Client Script:
Field name- Caller
Type- On change
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (newValue == '') {
g_form.removeOption('impact', '4');
}
var caller = g_form.getReference('caller_id', alert);
function alert(caller) {
if (caller.vip == 'true') {
//alert("calle is VIP");
g_form.addOption('impact', 4, "VIP User");
return true;
} else {
g_form.removeOption('impact', 4);
}
}
//Type appropriate comment here, and begin script below
}
Please mark my answer as Helpful, if it is useful to you.
Thanks,
Sourabh Akiwate