Skip to content

Commit 47960ef

Browse files
authored
Code.js
1 parent 0c8bbf2 commit 47960ef

File tree

1 file changed

+18
-0
lines changed
  • Client-Side Components/Client Scripts/Assigned to user changes count

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
2+
if (isLoading || newValue === '') {
3+
return;
4+
}
5+
6+
//Type appropriate comment here, and begin script below
7+
alert("user sys_id " + newValue);
8+
var aj = new GlideAjax('assignedtochange'); //calling Script Include
9+
aj.addParam('sysparm_name', 'assigned'); //calling the function
10+
aj.addParam('sysparm_assign', newValue); //passing the parameter
11+
aj.getXMLAnswer(answer);
12+
13+
function answer(response) { //response = count of incidents
14+
alert ("Assigned to has already been an part of " + response + " Incidents");
15+
}
16+
17+
18+
}

0 commit comments

Comments
 (0)