The CreatorCon Call for Content is officially open! Get started here.

Display records in table

Kumar887
Tera Contributor

Hi Community!

 want to display the record in custom created related list of all users having saming manager in ServiceNow. For e.g. Abel, Jack has manager Adel, so when I open Adel record, I should be able to see the Abel user and Jack user.

This is the script I used and don't know how it will execute in related list:

var gr = new GlideRecord('sys_user');
gr.addQuery('user_name','abel');
gr.query();
gr.next();
gs.print(gr.getDisplayValue('manager'));

I tried this is in Scripts Background option in Application Navigator

 


Thanks in Advance!

0 REPLIES 0