Serviceportal - Get parameter value from URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 01:02 AM
How can i get the URL and verify the value of a parameter value in a ACL script..
i have tried
var val = $sp.getParameter("view"); also GlideTransaction.get()
but both doesn't seem to work...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 01:27 AM
Hi,
ACL script is server side so you cannot use that.
try this and check once
var viewName = gs.action.getGlideURI().getMap().get('view');
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
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
12-13-2018 03:17 AM
Hi,
Im in a scoped application, when i tried the above line, it gave the below error..
Execute operation on API 'ScopedGlideSystem' from scope 'xyz' was denied. The application 'xyz' must declare a cross scope access privilege. Please contact the application author to update their privilege requests.
any help on how to resolve this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2018 05:51 AM
Hi,
I believe it should work in scoped app as well; but since you want to run it in portal that may be causing the issue
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
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
12-13-2018 06:00 AM
Hi,
Can you elaborate more on what exactly you are trying to achieve with reading the parameter value and its use in ACL script ?
Maybe there is some other way of implementing the solution instead of fixing the ACL
Thanks
Ishan Parikh