com.glide.script.RhinoEcmaError: "RP" is not defined. Warnings in logs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-15-2021 07:07 AM
I have a very simple ACL which has a role and a script.
Users are 'passing' the role part of the ACL with no issue, but getting denied write access to the field when evaluating the script part of the ACL.
In the script I have:
answer = !JSUtil.nil(RP.getParameterValue("sysparm_modal_override_acl"));
That url parameter is present and set to true on the Glide Modal window on which the field is located.
The logs show warnings for "RP" is not defined. If I do a gs.info(RP.getParameterValue("sysparm_modal_override_acl")) however that log returns true. (So this proves that the parameter is there?)
The field is allowing the user to make changes to it (i.e. it is not greyed out), but when they try to save the form the changes do not go through; also the field watcher logs show that write access is false to the same field:
Any ideas what could be causing this? Perhaps getting overwritten somewhere?
Edit: Also might be worth mentioning that I have logged the RP object in the ACL and the param
sysparm_modal_override_acl=true
is there too... so why is the ACL denying access??
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-16-2021 02:31 AM
Hi,
did you print in logs what came for the URL?
var url = gs.action.getGlideURI().toString();
gs.info(url);
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
‎11-23-2022 02:13 AM
To avoid getting com.glide.script.RhinoEcmaError: "<script include function name>" is not defined:
Try to call the function inside script include using this.<script include function()>