We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4989ec6 commit c850cc7Copy full SHA for c850cc7
1 file changed
Client-Side Components/Client Scripts/Display Custom Field Based on Incident Channel Field and populate with Caller Information/GlideAjaxCallerInfo.js
@@ -0,0 +1,22 @@
1
+var CallerInfoHelper = Class.create();
2
+CallerInfoHelper.prototype = Object.extendsObject(AbstractAjaxProcessor, {
3
+
4
+ getCallerInfo: function() {
5
+ var callerSysId = this.getParameter('sysparm_caller');
6
+ if (!callerSysId)
7
+ return JSON.stringify({ email: '', mobile: '' });
8
9
+ var userGR = new GlideRecord('sys_user');
10
+ if (!userGR.get(callerSysId))
11
12
13
+ var userObj = {
14
+ email: userGR.email.toString(),
15
+ mobile: userGR.mobile_phone.toString()
16
+ };
17
18
+ return JSON.stringify(userObj);
19
+ },
20
21
+ type: 'CallerInfoHelper'
22
+});
0 commit comments