Skip to content

Commit e43d924

Browse files
authored
Urgency high (#899)
* Create script.js in urgency-high * Create readme.md in urgency-high
1 parent ed9c6e3 commit e43d924

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is a client script that change urgency to high automatically when changing caller field with the caller name whose vip is true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
2+
if (isLoading || newValue === '') {
3+
return;
4+
}
5+
6+
var vipalert = g_form.getReference('caller_id',vipFunction);
7+
function vipFunction(vipAlert){
8+
if(vipAlert.vip == 'true'){
9+
g_form.setValue('urgency','1');
10+
}
11+
}
12+
13+
}

0 commit comments

Comments
 (0)