- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 04:17 PM
Hi,
Was hoping someone can assist. Is there a way to check on which site the user is currently on? CMS or normal service-now page.
I have a requirement wherein on CMS, when a user clicks a link on an email that opens up a an incident on CMS then user updates the incident record then clicked "update".
The succeeding page will display incidents on list view. This is where we may need to make some customisations. If the user is non itil, the list view will show incidents related to the current user however if the user is an itil or mulit role user, the list is showing ALL incidents.
Is there a way to check that if in CMS, that UI Action "Update" wherein the succeeding page will display a list of incidents that are only related to the current logegd in user?
I have tried the below simple script on the Update UI Action script but it isn't working.
Hope someone has also come across this.
current.update();
if (document.URL.toString().indexOf('Portal') >= 0 ) {
action.setRedirectURL('/task_list.do?sysparm_query=caller_id%3Djavascript%3Ags.getUserID();
}
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2015 05:28 PM
Hi,
Just in case someone had a similar problem, I went on to a different direction to accomplish this. Instead of validating from the URL, I used the current view instead.
var current_view = RP.getParameterValue('sysparm_view');
if (current_view == "ess") {
[do something]
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 08:01 PM
This post will assist you. Kindly check
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2015 09:22 PM
Thanks Deepak, If I understand the post correctly it is about leveraging the contact_type field however I don't think I can use it on my case.
Our scenario is a user clicks on an email notification that has a link of an existing incident record. user clicks on link, opens up on our portal and updates the comments field. Upon update, the page after the update is a list of incidents. Depending on the user's role will determine the incidents on the list I believe this is due to the ACL rules regarding access to incident records.
The existing incident record opened could be any and not just 'ess'.
I was thinking that if is it possible to grab the current URL from a UI Action script? Portals normally have 'ess' on the link. was hoping to use indexOf to check it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-08-2015 05:28 PM
Hi,
Just in case someone had a similar problem, I went on to a different direction to accomplish this. Instead of validating from the URL, I used the current view instead.
var current_view = RP.getParameterValue('sysparm_view');
if (current_view == "ess") {
[do something]
}