File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Client-Side Components/Catalog Client Script/Autopopulate user information fields Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * The following is a client callable script include. This can be used with the onChange Client script to be able to gather the data on the server side
3+ */
4+
5+ var ReferenceQualifierAjaxHelper = Class . create ( ) ;
6+ ReferenceQualifierAjaxHelper . prototype = Object . extendsObject ( AbstractAjaxProcessor , {
7+ getUserInformation : function ( ) {
8+ var userID = this . getParameter ( 'sysparm_user' ) ;
9+ var userRec = new GlideRecord ( 'sys_user' ) ;
10+
11+ if ( userRec . get ( userID ) ) {
12+ var results = {
13+ "email" : userRec . getValue ( 'email' ) ,
14+ "department" : userRec . getValue ( 'department' ) ,
15+ "title" : userRec . getValue ( 'title' ) ,
16+ "phone" : userRec . getValue ( 'phone' )
17+ } ;
18+
19+ return JSON . stringify ( results )
20+ }
21+
22+ } ,
23+
24+ type : 'ReferenceQualifierAjaxHelper'
25+ } ) ;
You can’t perform that action at this time.
0 commit comments