Portal View - Request Item not visible under the Request Ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 11:28 PM
Hello All,
Need urgent help not sure where to look at this issue - When an user submits a Request under Open request when they click on it they are unable to see the RITM associated with the Request Item and they have no option to add comments aswell. Please help its also seems this is only happening with ITIL users any idea
Added Screenshot of the view from an end user not able to see RITM
- Labels:
-
Request Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 11:57 PM
Hi
go to Service Portal -> Service Portal Configuration. then click on Portal Tables on the header menu then -> Menu Items.
search for My Requests. in the Server Script you can modify it to query the "sc_req_item" table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2019 12:04 AM
Below is the Script and i do see Sc_req_item getting queried Please help
// maximum number of entries in this Menu
var max = 10;
var t = data; // shortcut
t.items = [];
var u = gs.getUser().getID();
// use record watchers to tell header when to update dropdown counts
t.record_watchers = [];
t.record_watchers.push({'table':'incident','filter':'active=true^caller_id=' + u});
t.record_watchers.push({'table':'sc_request','filter':'active=true^requested_for=' + u});
var st = new GlideRecord('service_task');
if (st.isValid()) {
t.record_watchers.push({'table':'service_task','filter':'active=true^opened_by=' + u});
st.addActiveQuery();
st.addQuery('opened_by', gs.getUserID());
st.orderByDesc('sys_updated_on');
st.setLimit(max);
st.query();
while (st.next()) {
if (!st.canRead())
continue;
var a = {};
$sp.getRecordValues(a, st, 'short_description,sys_id,number,sys_updated_on');
if (st.short_description.nil())
a.short_description = "(No description)";
a.__table = st.getTableName();
a.type = 'record';
a.sortOrder = st.sys_updated_on.getGlideObject().getNumericValue();
t.items.push(a);
}
}
var z = new GlideRecord('incident');
z.addActiveQuery();
z.addQuery('caller_id', gs.getUserID());
z.orderByDesc('sys_updated_on');
z.setLimit(max);
z.query();
while (z.next()) {
if (!z.canRead())
continue;
var a = {};
$sp.getRecordValues(a, z, 'short_description,sys_id,number,sys_updated_on');
if (z.short_description.nil())
a.short_description = "(No description)";
a.__table = z.getTableName();
a.type = 'record';
a.sortOrder = z.sys_updated_on.getGlideObject().getNumericValue();
t.items.push(a);
}
var z = new GlideRecord('sc_request');
z.addActiveQuery();
z.addQuery('requested_for', gs.getUserID());
z.orderByDesc('sys_updated_on');
z.setLimit(max);
z.query();
while (z.next()) {
if (!z.canRead())
continue;
var ritm = new GlideRecord('sc_req_item');
ritm.addQuery('request', z.getUniqueValue());
ritm.query();
if (!ritm.next())
continue;
var a = {};
$sp.getRecordValues(a, z, 'sys_id,number,sys_updated_on');
if (ritm.hasNext()) // there are multiple items for this request
a.short_description = ritm.getRowCount() + ' requested items';
else if (!ritm.canRead()) // only one item, but user cannot see it
continue;
else // one item, and user can see it
a.short_description = ritm.cat_item.getDisplayValue() || ritm.getDisplayValue("short_description");
a.__table = z.getTableName();
a.type = 'request';
a.sortOrder = z.sys_updated_on.getGlideObject().getNumericValue();
t.items.push(a);
}
t.items.sort(function(a, b) {
return b.sortOrder - a.sortOrder;
});
t.items = t.items.slice(0, max); // only want first 30
t.count = t.items.length;
var link = {title: gs.getMessage('View all requests'), type: 'link', href: '?id=requests', items: []};
t.items.unshift(link); // put 'View all requests' first

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2019 01:02 AM
Hi
Please go thorough the below link :-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-22-2019 04:11 AM
not working? any more thoughts or ideas