
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 05:05 AM
Hello,
I am just wondering, if it is possible to get all possible values / fields from record successfully get from GlideRecord query?
Or each field has to be addressed manually?
I was thinking about similar output like in Powershell with Select * .
Thank you!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 05:19 AM
Hi,
You always get all field values from the GlideRecord query.
When you get value then you can read them like gr.column_name.
If you want to access all fields then you can script like this:
var incGr = new GlideRecord('incident');
incGr.get('d71da88ac0a801670061eabfe4b28f77'); // a sys_id of a incident
for (var key in incGr) {
gs.info('Attribute Name : '+key +' Value : '+incGr[key]);
}
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 05:19 AM
Hi,
You always get all field values from the GlideRecord query.
When you get value then you can read them like gr.column_name.
If you want to access all fields then you can script like this:
var incGr = new GlideRecord('incident');
incGr.get('d71da88ac0a801670061eabfe4b28f77'); // a sys_id of a incident
for (var key in incGr) {
gs.info('Attribute Name : '+key +' Value : '+incGr[key]);
}
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2021 05:35 AM
great, this is exactly , what I was looking for and this even did not come up to my mind 🙂
Thank you