- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 06:29 AM
1 :- When i am trying to get the value from watchlist field using "getValue()" method. It is giving me the ' sys_id' of the users.
2:- When i am trying to get the user's details using the "getReference()" method. It is not giving me the desired result.
I am trying to get the marked values.
Please help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 07:32 AM - edited 08-01-2025 07:35 AM
Hey @SK Verma ,
If you want to get the names like 'abel tutuer' from watch list then you need to use like below.
var gr = new GlideRecord('incident')
gr.addQuery('number', 'INC0000018')
gr.query()
if (gr.next())
gs.info(gr.watch_list.getDisplayValue())
It will give all the user names which are on incident so output will look this
Adam Scott, Rock Helmet, Abel Tuter, Mike Mentzer
Thanks,
Bhimashankar H
----------------------------------------------------------------------------------------
If my answer helps you or resolves your query, please consider marking as 'Helpful'/'Accept As Solution'. So future readers with similar questions can find it easily.
----------------------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 07:32 AM - edited 08-01-2025 07:35 AM
Hey @SK Verma ,
If you want to get the names like 'abel tutuer' from watch list then you need to use like below.
var gr = new GlideRecord('incident')
gr.addQuery('number', 'INC0000018')
gr.query()
if (gr.next())
gs.info(gr.watch_list.getDisplayValue())
It will give all the user names which are on incident so output will look this
Adam Scott, Rock Helmet, Abel Tuter, Mike Mentzer
Thanks,
Bhimashankar H
----------------------------------------------------------------------------------------
If my answer helps you or resolves your query, please consider marking as 'Helpful'/'Accept As Solution'. So future readers with similar questions can find it easily.
----------------------------------------------------------------------------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2025 07:59 AM
Hi @SK Verma ,
Getreference method should be avoided as per best practices so dont use it - Try getDisplayValue() method.
Regards,
Nikhil Bajaj
Regards,
Nikhil Bajaj