Customizing Child Incidents slushbucket

Daniel Gens
Tera Contributor

Hello ServiceNow Community,

I have a request to customize the slushbucket that appears when editing the Child Incidents related list in an Incident record:

Screen Shot 2017-05-29 at 6.31.03 PM.png

Here is the slushbucket:

Screen Shot 2017-05-29 at 6.34.16 PM.png

I need to change the way the slushbucket is displayed to achieve the following:

  1. Two columns displayed in the collection. Is it possible to display the title (short description) of the incident next to its number? I am aware of the possibility of creating a custom UI page, but I was wondering if I could just customize 'sys_m2m_template.do' instead. If this UI page cannot be edited, is there a way to create a copy of it and then customize the copy?
  2. I am having trouble changing the default sort order of the collection. My goal is to have it sorted by Incident number, so that the newest (largest number) incidents are listed at the top.

Here is a Script from the UI Action "Edit..." that I'm using to specify default filters and sort order:

var uri = action.getGlideURI();

var path = uri.getFileFromPath();

uri.set('sysparm_m2m_ref', current.getTableName());

uri.set('sysparm_collection_related_file', current.getTableName());

uri.set('sysparm_form_type', 'o2m');

uri.set('sysparm_stack', 'no');

uri.set('sysparm_query', 'active=true^state!=6^ORDERBYDESCnumber');

gs.log('uri: ' +uri.toString('sys_m2m_template.do'));

action.setRedirectURL(uri.toString('sys_m2m_template.do'));

And here is the gs.log message it produces:

uri: sys_m2m_template.do?sys_is_list=true&sys_is_related_list=true&sys_target=incident&sysparm_checked_items=&sysparm_ck=ab526b5d4f0b320047d527118110c78438cd9d49c260c1740dfc9114c3efc04df8d2aa7e&sysparm_collection=incident&sysparm_collectionID=78271e1347c12200e0ef563dbb9a7109&sysparm_collection_key=parent_incident&sysparm_collection_label=Child+Incidents&sysparm_collection_related_field=&sysparm_collection_related_file=incident&sysparm_collection_relationship=&sysparm_fixed_query=&sysparm_form_type=o2m&sysparm_group_sort=&sysparm_list_css=&sysparm_m2m_ref=incident&sysparm_query=active%3dtrue%5estate!%3d6%5eORDERBYDESCnumber&sysparm_referring_url=incident.do%3fsys_id%3d78271e1347c12200e0ef563dbb9a7109%4099%40sysparm_record_rows%3d34%4099%40sysparm_record_target%3dincident%4099%40sysparm_record_list%3dactive%253Dtrue%255EORDERBYDESCnumber%4099%40sysparm_record_row%3d2&sysparm_stack=no&sysparm_target=&sysparm_view=

Any thoughts and suggestion are greatly appreciated.

1 ACCEPTED SOLUTION

That page's code is not accessible through the instance. That is, it doesn't exist as a UI Page or a UI Macro. It "lives" on the filesystems of the nodes that make up your instance


View solution in original post

6 REPLIES 6

Hello Daniel,

Did you ever complete this UI Page?
If yes would you mind sharing?

Hello,

I never completed it, it turned out to be quite complex and we changed our requirements instead. Sorry 😕