- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2022 01:31 PM
Hi all,
I need a field value from a field which is not available to the normal user because of an ACL. Is there a way to grant a script some kind of temporary permission to read this specific field or to bypass the ACL momentarily?
My first thought was to create an elevated role which is enabled/disabled via a script, but I cannot figure out how to hide that role under "Elevate Roles". And yes I could go with that and deactivate is every time the user tires to manually enable the elevated role, but I think the user should not be bothered with a confusing option which he cannot use.
Thanks in advance
Karl
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2022 01:11 AM
You can secure the field with ACL's for a regular (non-elevated) role. And when you need the value you can use for example an on Display business rule that loads the value using a GlideRecord Query. That way that field value is available for usage in Client scripts.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2022 01:41 PM
Is this a client script or a server side script? Typically server side you should be able to access any field on any record. If this is client side, usually the answer is to create a GlideAjax script include to retrieve the value you need and then call it client side, let the script run server side and return the value. Can you share the details of exactly what you're trying to accomplish?
I hope this helps!
If this was helpful, or correct, please be kind and mark the answer appropriately.
Michael Jones - Proud member of the GlideFast Consulting Team
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2022 12:13 AM
I need to evaluate the content in the otherwise unaccessable field. The evaluation is in nested in Client Scripts and Catalog Client Scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2022 12:25 AM
Hi,
you can use GlideRecord query on that table's record and can access the field value.
ACLs won't evaluate when you use GlideRecord
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2022 01:11 AM
You can secure the field with ACL's for a regular (non-elevated) role. And when you need the value you can use for example an on Display business rule that loads the value using a GlideRecord Query. That way that field value is available for usage in Client scripts.