Can we sort the records in a related list of Incident table in descending order of 'sys_created_on' through "scripting"?

geena
Tera Contributor

I tried using business rule and client script(OnChange) but the records are not getting sorted.

find_real_file.png

 

 

 find_real_file.png

 

 

 

4 REPLIES 4

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You shouldn't need to use a script as you can control the default sort order for a list through the ui. The user will be able to override it with their own preference, though.

geena
Tera Contributor

Thank you Brad Tilton.I tried to set default sort order using '&sysparm_order=sys_created_on &sysparm_order_direction=desc'.But its not getting sorted.On impersonation also I want the sorting to be reflected.

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hmm...you could try creating a default filter for the related list that includes a sort here, or use a client script like this.

Baala T
Mega Guru

Hi Geena,

I hope you have found this already, if not please do refer this link

https://docs.servicenow.com/bundle/kingston-platform-administration/page/administer/list-administrat...

 

Regards,
Bala T