My Tickets in Service Portal should display all Requests, Ritm's and incidents

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2018 12:57 AM
Hi All,
I am having a requirement in Service Portal. There is 'My Tickets', now the requirement is on clicking My Tickets it should display all the REQ , RITM , INC that is present in descending order, i.e the latest one should be on the top where as the oldest one at the bottom.
If anyone has come across this requirement do let me know how you had developed the same.
Thanks,
Angshuman

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2018 01:20 AM
HI,
See below code, this is from My tickets:
if (st.isValid()) {
st.addActiveQuery();
st.addQuery('opened_by', gs.getUserID());
st.orderByDesc('sys_updated_on'); //There you have to change to sys_created_on, So that it will give you latest first. NOw it gives updated first.
st.setLimit(max);
st.query();
while (st.next()) {
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);
}
}
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2020 02:00 AM
kindly let me know to add short description for request , as of now i can isee "item name , request number" when i click on My tickets.
now i want to see " item name , short description and request number" . kindly let me know code and where can we update that code.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2020 02:17 AM
Hi
Please refer below link it will help you
Please mark correct and Helpful if it helps
Thanks and Regards
Himanshu Dubey

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2020 12:46 AM
Please mark the answer correct and close the thread so it will help others