From 920224640eac6ef04876583cfca57debc210243b Mon Sep 17 00:00:00 2001 From: Riya Misra <146907130+riya-misra-1@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:07:10 +0530 Subject: [PATCH 1/2] Create script.js in urgency-high --- .../script.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Client Scripts/Set Urgency to High onChange of caller field/script.js diff --git a/Client Scripts/Set Urgency to High onChange of caller field/script.js b/Client Scripts/Set Urgency to High onChange of caller field/script.js new file mode 100644 index 0000000000..09a8566968 --- /dev/null +++ b/Client Scripts/Set Urgency to High onChange of caller field/script.js @@ -0,0 +1,13 @@ +function onChange(control, oldValue, newValue, isLoading, isTemplate) { + if (isLoading || newValue === '') { + return; + } + + var vipalert = g_form.getReference('caller_id',vipFunction); + function vipFunction(vipAlert){ + if(vipAlert.vip == 'true'){ + g_form.setValue('urgency','1'); + } + } + +} From e3ec7cc792bd134139ba16b99e6cdf3f18fcf7ad Mon Sep 17 00:00:00 2001 From: Riya Misra <146907130+riya-misra-1@users.noreply.github.com> Date: Thu, 19 Oct 2023 15:08:26 +0530 Subject: [PATCH 2/2] Create readme.md in urgency-high --- .../Set Urgency to High onChange of caller field/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 Client Scripts/Set Urgency to High onChange of caller field/readme.md diff --git a/Client Scripts/Set Urgency to High onChange of caller field/readme.md b/Client Scripts/Set Urgency to High onChange of caller field/readme.md new file mode 100644 index 0000000000..de3daa89ea --- /dev/null +++ b/Client Scripts/Set Urgency to High onChange of caller field/readme.md @@ -0,0 +1 @@ +This is a client script that change urgency to high automatically when changing caller field with the caller name whose vip is true