Response templates sorting/ordering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2019 01:07 AM
How to set order of response templates in the dropdown which appears when we click on the button -Responses?
- Labels:
-
Incident Management
- 1,364 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2019 06:54 AM
Hey Rocking Ravs,
Were you able to find a solution for this? I tried updating the "message_template" UI page and "NoteTemplate" script include but couldn't get the sort order to work.
Thanks,
Justin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2019 01:45 AM
Hi Justin,
I found the solution to this and it is working now.
I made the change in script include - NoteTemplateCheck
_getTemplateConfigurationsGrForTable : function(currentTable){
var tableParent = new GlideTableHierarchy(currentTable).getBase();
var table = currentTable;
// add the current table to parentlist
var tableParentList = [];
tableParentList.push(table);
//get all the parents of the current table
while ( tableParent != table) {
tableParentList.push(tableParent);
table = tableParent;
tableParent = new GlideTableHierarchy(table).getBase();
}
//comma separated values of the parent list
var tableAncestors = tableParentList.join();
var noteTempConfigGR = new GlideRecordSecure("sn_templated_snip_note_template");
noteTempConfigGR.addQuery("table","IN",tableAncestors);
noteTempConfigGR.orderBy('name');
noteTempConfigGR.query();
return noteTempConfigGR;
},
You can try this.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-11-2019 06:50 AM
Ahh, the one place I didn't check. I tested this on my personal instance and it worked perfectly.
Thank you for providing the solution!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2021 02:03 PM
Works like a charm!
Thanks!