Query using GlideRecord when canRead() returns false
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 04:21 AM
Hi,
I have a requirement that a user, irrespective of the role configured in Service now should be able to view any incident details. Currently an Admin or the Incident submitter are able to view the incident.
I tried to query the incident using the below lines
var gr = new GlideRecord('incident');
gr.get('a valid sys_id');
console.log('Incident count: ' + gr.getRowCount()); // this line is printing 0 when the canRead() method returns false (for a user who is neither an admin nor the incident submitter) for the particular Glide record.
Please help me to fix this issue.
Thanks in advance,
Vinu
- Labels:
-
Service Portal Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 12:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2018 11:32 PM
Thank you so much Sanjiv for the detailed explanation. I will try to implement this and see.