- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2015 01:29 PM
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 (
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2015 07:35 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2015 01:32 PM
... All the fields pass correctly except the "Manager" field. This is a reference field from the Sys_User table. This passes a sys id. I need the display name. I have not found a way to convert the sys id to the display name.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2015 03:44 PM
You should be able to pass manager.name to get the display value but not sure if you are using variable or how you are passing it. Normally adding .name would work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2015 07:35 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-06-2015 04:52 AM
That worked like a charm. Thank you very much!