- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 03:21 AM
Hi All,
Is it Possible to Get Report with User Name and Sys ID.
Please help..
User Name | Sys ID |
---|---|
Regards,
Sanitha
Solved! Go to Solution.
- Labels:
-
Customer Service Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 03:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-09-2017 06:20 AM
Hi Sanitha
It is possible for the report name and sysids
But we have to do some stuff for this
1.Create a custom fields on the form with the names sysid and Test fields as a string filed types in user table form
2. Create a Business rule on user table (sys_user) like this for the both Insert and update select the both check boxes
(function executeRule(current, previous /*null when async*/) {
var sysid=current.sys_id;
current.u_sysid=sysid;//Replace sysid as per ur wish
gs.addInfoMessage(sysid);
})(current, previous);
3. Run the backgroundscript like this for updating the all the records in the database
var gr=new GlideRecord('sys_user');
gr.addActiveQuery();
gr.query();
while(gr.next()){
gr.u_text='hello am updating this records for populating all recordsysids in sysid field ';
gs.log(gr.getRowCount());
gr.update();
}
Finally u will get the report like this i hope this will helpful to u
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2022 07:05 AM
I know its an old post, however just wanted to share a workaround solution that I used to produce users by name and sys_id
Run a background script to display your users...
var usr = new GlideRecord('sys_user');
usr.addActiveQuery();
usr.query();
while (usr.next()){
gs.print(usr.name + ',' + usr.sys_id);
}
Copy/paste the return in excel, delimit by comma...use a formula to remove the '*** Script:' part (something like...'=right(A1, len(A1)-13)' for each row