How do I get the referring URL within a Business Rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2015 09:54 AM
I can't find the answer to this, and I'm pretty sure it's because it's such a dumb question.
I've got a Record Producer, and in the script that handles it, I'd like to have it redirect to one place if we're working with a CMS site, and a different place if we're not (like the core application).
I figure this should be pretty easy: just look at your URL, and if it contains "ESS" or whatever setRedirect() to A, and if it doesn't setRedirect() to B. The problem is... I can't figure out how to get that full referring URL.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-27-2015 07:22 AM
I needed access to the referring URL as well and with some inspection of the undocumented GlideTransaction object I was able to get the referring URL with this server-side code.
var transaction = GlideTransaction.get();
var request = transaction.getRequest();
var referer = request.getHeader("referer");
You could chain those methods together as well.
var referer = GlideTransaction.get().getRequest().getHeader("referer");
The request object is an instance of org.apache.catalina.connector.RequestFacade.
Michael Mongeau
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2015 05:17 AM
This sounds really promising. I'll have to give it a try.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-29-2016 10:16 AM
Michael,
This is great. Thanks for sharing. Its exactly what I was looking for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 02:44 AM
This returns null on IE. Any idea why? We are on Eureka currently.