File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Client-Side Components/Client Scripts/Display Custom Field Based on Incident Channel Field and populate with Caller Information Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 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+ return JSON . stringify ( { email : '' , mobile : '' } ) ;
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+ } ) ;
You can’t perform that action at this time.
0 commit comments