How to encode uri with javascript:gs.getUserID()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 11:17 AM
Our team is using the widget-data-table and trying to test the export functionality with a filter that has javascript:gs.getUserID(). When we try to export to Excel, it returns a Forbidden page. When we take away "javascript:" it works, but the exported list of records seems to ignore that part of the filter. Is there a way to encode the uri when a filter has "javascript:gs.getUserID()" within it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 12:07 PM
What if you try is (dynamic) me instead. Does that have the same issue?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2022 12:18 PM
Hi Mike, thanks for the reply, our team is fairly confident that the reason this isn't working is due to a WAF issue. We took a look at this article https://www.servicenow.com/community/developer-forum/how-to-encode-uri-with-javascript-amp-colon-gs-... and made the changes so that our query looks like subject_person!%3Djavascript%3Ags.getUserID(). When testing this in a personal dev instance, it works perfectly, but refuses to work in our development instance.