Is there anyway to restrict/pass to include only few fields from GlideRecord query?

Mihir YSSS
Tera Contributor

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.  

1 REPLY 1

Sandeep Rajput
Tera Patron
Tera Patron

@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/