Referance field returns sys id need display name

stuartsisk
Kilo Explorer

I have a Record Producer for requesting the creation of a new employee (on boarding).   The Record Producer fires a workflow to create tasks associated with the process.   Information from the Record Producer is passed to the tasks via script (

1 ACCEPTED SOLUTION

I Stuart,


I am not able to see the script section you have provided. Not sure if it is missing in the question itself or I am not able to see it.



Since your sys_id is being passed to the workflow, you can get the display name of the user record by using following code.



var gr = new GlideRecord('sys_user'); // initialize the object of the record.


gr.get('sys_id'); // pass on the sys_id of the manager here


gs.log(gr.getDisplayValue()); // log a manager record display name for debug / test purpose


var display = gr.getDisplayValue(); // store the display name in a variable



I hope this helps you to proceed with your workflow script.


View solution in original post

7 REPLIES 7

Welcome.


Damian Martinez
Mega Sage

Hello everyone,
I am experiencing the same issues.
Where do you apply the script above?is it a client script? or script inside the flow?
Thanks!

You can use OnLoad Client Script