Resetting the default list view to include sort orderIssue <span id="__caret">_</span><span id="__caret">_</span>�<span id="__caret">_</span><!-- div.margin { padding: 10px 40px 40px 30px; } table.tocTable { border: 1px solid; border-color: #e0e0e0; background-color: #fff; } .title { color: #d1232b; font-weight: normal; font-size: 28px; } h1 { color: #d1232b; font-weight: normal; font-size: 21px; margin-bottom: 5px; border-bottom-width: 2px; border-bottom-style: solid; border-bottom-color: #cccccc; } h2 { color: #646464; font-weight: bold; font-size: 18px; } h3 { color: #000000; font-weight: bold; font-size: 16px; } h4 { color: #666666; font-weight: bold; font-size: 15px; } h5 { color: #000000; font-weight: bold; font-size: 13px; } h6 { color: #000000; font-weight: bold; font-size:14px; } ul, ol { margin-left: 0; list-style-position: outside; } .snc-kb-view-content-wrapper { margin-right:20px !important;<span id="CmCaReT"></span> } --> Description When "Reset to column defaults" is selected to reset a personalized list view to the default layout, the sort column and direction are not included. This can be confusing for users if they had sorted on a column that is not part of the default layout. The list would appear to not be sorted by any column. The "Reset to column defaults" action calls the script include UIPage. Line 19 initiates the reset process which consists of several calls to other script includes and back end classes. Unfortunately, this logic does not affect the sys_user_preference records related to the sort column and direction. The preferences are <table_name>.db.order and <table_name>.db.order.direction. Procedure *** Customization Disclaimer *** The following procedure describes an unsupported customization. Please utilize with care and always test first in sub-prod. The UIPage script include can be modified to set the sort preferences when it resets to the default list layout. This sample code starts at line 19: Before else v.reset(this.getParameter('sysparm_table')); After else { v.reset(this.getParameter('sysparm_table')); var tbl = this.getParameter('sysparm_table'); // If we're resetting the Incident table if ( tbl == 'incident' ) { // Set the sort column user preferences to the default values gs.getUser().setPreference( tbl + '.db.order', 'number'); gs.getUser().setPreference( tbl + '.db.order.direction', 'DESC'); } } Call a separate script include The above example sets the sort column to number when the incident table is reset to the default layout. To apply this functionality to multiple tables, a more manageable approach would be to move this logic into its own script include which can then be called from this script include: else { v.reset(this.getParameter('sysparm_table')); var sortReset = new tableSortReset(); sortReset.checkTable( this.getParameter('sysparm_table')); } Applicable Versions Tested in Madrid