Using document.URL within a Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2015 07:13 AM
I'm fairly new to servicenow scripts, however I'm looking into extracting the current URL via a business rule.
I've noticed var instanceURL = gs.getProperty("glide.servlet.uri") will return the instance URL, however it does not return the current URL that I'm seeing.
I've tried utilizing document.URL; but noticed that does not work (returns with an error).
Would there be another method for extracting the current URL within a Business Rule script?
Thanks in advanced.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2015 08:58 AM
try something like this, might help.
var transaction = GlideTransaction.get();
var ViewNameIs = transaction.getRequestParameter("sysparm_view");
Check what "transaction " shows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2015 09:24 AM
viewing transaction as a string, it returns something similar to:
render: 0:00:00.000, network: 0:00:00.000, chars: 0, SQL time: 170 (count: 42), business rule: 238 (count: 3)
var ViewNameIs seems to return null.