- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-21-2017 08:46 AM
In our Service Portal that was developed by a third party, we have a section along the top of the screen with personalised options for the logged in user
Clicking on the User name brings up the user record and they can get to the Knowledge base and Service Catalog from this section too. Also, as you can see above, there is a drop down where the user can view their open tickets. What I'd like to do is change this so that the user can also view tickets raised by their team colleagues as well as themselves (each user record has a populated team field - u_team in the sys_user table) - how can I do this?
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2017 12:22 AM
Hi David,
You need to modify 'My Requests' widget's Server script - http://instancename.service-now.com/sp_config?id=widget_editor&sys_id=f1672671d7301200a9addd173e24d4... as follows.
1. Created a new function to get current user' team.
function getMyTeam(userID){
gs.log(userID);
var user = new GlideRecord('sys_user');
if(user.get(userID))
return user.team;
}
2. Replace the line 'gr.addEncodedQuery('requested_for=javascript:gs.getUserID()');' with the below lines
var myTeam = getMyTeam(gs.getUserID());
gr.addQuery('team', myTeam);
3. Change the line 'var gr = new GlideRecordSecure('sc_request');' to use GlideRecord as below
var gr = new GlideRecord('sc_request');
With all the changes, it would look like this.
Hope this helps. Mark the answer as correct/helpful based on impact.
Thanks
Antin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2017 08:10 AM
Hi - I can't find where I mark something as Correct? How do I do this?
(Apologies - I'm new here!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2017 08:17 AM
Hi David,
Please try this URL - Re: Service Portal - Viewing team tickets
If you still cant find the 'Correct Answer' button, please refer the below post.
How To Mark Answers Correct From Community Inbox
Thanks
Antin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2017 08:20 AM
Got it, thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2017 02:47 PM
Hi David,
That's a menu option which you need to modify. Please find below steps :
1. Select "Menus" which is under Service Portal & select "SP Header Menu"
2. Open "Request" Menu item :
3. Modify the filter conditions (include script which can prepare list of team member and provide that list in filter condition)