- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 07:37 AM
I have a global business rule that should only run if the user isn't on a certain page (record producer) within the Service Portal. The old function used on our CMS doesn't get enough information (gs.action.getGlideURI().getMap().toString();). How can I get the information I need?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 10:16 AM
Found the answer from HI! Add below to your business rule to get the URL of the current page
var referer = GlideTransaction.get().getRequest().getHeader("referer");
gs.log("BR: referer = " + referer+ ".");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 01:57 PM
Stijn,
We thought about that, but there are over 100 variables referencing the application table. We'd have to add that ref qual to all those variables. Was trying to do something at a global level.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 02:04 PM
I'm afraid you'll have to add the reference qualifiers to all of them. Definitely agree on going as global as possible, providing us with 2 possible solutions:
- using a before query Business Rule
- using an ACL
Yet, I see your problem. There's a difference between the fullfiller working in the UI and wanting to see all of the applications, while end users in the Service Portal can only see a subset; therefore you have to check if someone is working on the record producer. Unfortunately, the implementation of the Service Portal doesn't allow us (after our previous try I've posted before) to apply any of those 2 mechanisms. thus implying you can't work globally and will have to differentiate via the reference qualifiers on the variables.
Maybe you can do yourself a favor to save time and work though... Via Scripts - Background you could update the reference qualifier field on each variable presenting the application list (do make sure you select the correct update set first before doing this).
My apologies if I'm tutoring too much, don't know your background or experience and certainly don't want to sound bossy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 02:11 PM
Stijn,
Your suggestions are very helpful. I appreciate you taking the time in helping me with this. I opened a HI ticket just in case there is some function that can be used that isn't documented. Fingers crossed. Otherwise, I think the reference qualifier would be the way to go.
Again, thank you for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-17-2018 02:13 PM
I hope some surprise may pop up during your quest! And you're welcome
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-18-2018 10:16 AM
Found the answer from HI! Add below to your business rule to get the URL of the current page
var referer = GlideTransaction.get().getRequest().getHeader("referer");
gs.log("BR: referer = " + referer+ ".");