Skip to content

Commit 2ade88b

Browse files
authored
Create scriptinclude.js
I have created a script include to get the details of caller_id.
1 parent 84e0ab8 commit 2ade88b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var GetCallerDetails = Class.create(); // This will create a new class.
2+
GetCallerDetails.prototype = Object.extendsObject(AbstractAjaxProcessor, {
3+
demoTest:function(){
4+
var caller = this.getParameter('sysparm_caller_id'); // this will make the instance for caller id
5+
var user = new GlideRecord('sys_user');
6+
user.addQuery('sys_id',caller); // This will query the parameter, if exist
7+
user.query();
8+
if(user.next()){ // If user found
9+
return "Email Id: " + user.email + "\n" + "First Name " + user.first_name + "\n" + "Last Name: " + user.last_name + "\n" + "User Id: " + user.user_name;
10+
}
11+
},
12+
13+
type: 'GetCallerDetails'
14+
});

0 commit comments

Comments
 (0)