Is there anyway to restrict/pass to include only few fields from GlideRecord query?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 07:49 AM
I want to include in the response of GlideRecord to have only number, short_description, sys_id field values in the GlideRecord query. Is there any function to include only certain fields in the query? I don't want restriction on the rows, i want to have restriction on the fields.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 08:17 AM
@Mihir YSSS OOTB you can't restrict number of columns returned by the query. However, with a combination of Field level read ACLs and GlideRecordSecure query you can limit the data returned with respect to different columns. The field where user doesn't have access to will be returned as NULL using GlideRecordSecure.
Fore more information please refer to https://developer.servicenow.com/blog.do?p=/post/gliderecord-vs-gliderecordsecure/