Obtain current URL from display business rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 11:17 AM
Right now we have an error message that pops up as an alert on our ESS page as well as our Support view page. We have a business request to remove the error message from the ESS View, but not the Support View. Because multiple roles can see both pages, we have to stop the error message based on the page view rather than whose's viewing it.
We're having trouble grabbing the main URL for the catalog task page where the error message appears. Is there any way to grab the current URL from the server side through a display business rule?
Any and all help would be appreciated, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 01:25 PM
What generates the alert - is it an onLoad client script on a certain form?
You could try with something like: if (view.startsWith("ess"))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2014 02:01 PM
Hi Caitlyn,
You could use something like RP.getReferringURL(), but I think that might only get you the url of the frame.
Assuming when you say ess page you mean cms portal, you should be able to check the URL of the browser in your client script to see if it has your ess portal suffix in it. Something like:
if (top.location.toString().indexOf('/ess/') > -1) {
//do something
}