Unable to set the default sort order on the Knowledge Result Sort WidgetDescriptionUnable to set the default sort order on the Knowledge Result Sort WidgetSteps to Reproduce Steps to Reproduce: The default sort order is stored as a user preference. You can override the default sort order by creating a record in the sys_user_preference table with the following values:Description: Knowledge Result Sort Widget default sort orderName: knowledge.portal_search.sort.fieldSystem: TrueUser: <Keep Empty>Type: stringValue: relevancy:descREFERENCE: https://hi.service-now.com/kb_view.do?sysparm_article=KB0758120Once user preferences , knowledge.portal_search.sort.field is set to relevancy:desc1) Go to demo instance on WP2.2) Open link - https://<instance-name>.service-now.com/sp?id=kb_search3) Observe NEWEST is highlighted Sort by | Views|Newest|Alphabetical which means it is getting sort by most recent.4) Now use the search bar and search for any term , for ex: cookies.5) Observe RELEVANCE is highlighted in Sort by Relevance | Views|Newest|Alphabetical which means it is getting sort by most relevant.6) Now click on any one other than relevance, for ex: Views. Now again search for another term ex: program. 7) Observe sort by is not defaulted back to RELEVANCE . VIEWS is still highlighted Sort by Relevance | Views|Newest|Alphabetical which means it is getting sort by most viewed.Once user preferences , knowledge.portal_search.sort.field is set to relevancy:desc1) Go to demo instance on any version before Washington.2) Open link - https://<instance-name>.service-now.com/sp?id=kb_search3) Observe NEWEST is highlighted Sort by | Views|Newest|Alphabetical which means it is getting sort by most recent.4) Now use the search bar and search for any term , for ex: cookies.5) Observe RELEVANCE is highlighted Sort by Relevance | Views|Newest|Alphabetical which means it is getting sort by most relevant.6) Now click on any one other than relevance, for ex: Views. Now again search for another term ex: program. 7) Observe sort by is defaulted back to RELEVANCE . It is highlighted Sort by Relevance | Views|Newest|Alphabetical which means it is getting sort by most relevant.Expected behavior Sort Order for KB search should honor knowledge.portal_search.sort.fieldActual behavior Sort Order for KB search is not honoring knowledge.portal_search.sort.fieldWorkaroundIn OOB user preference will not be saved as working in Vancouver, and we can have new property "glide.knowman.save_portal_search_sort_field_user_preference" that allows user to save the sort order prefereces on portal search.If this property value is true means when user changes the sort order option then it will save the sort order to user preference for that user and it will override the system preference in further portal search.If the property value is false means we are not saving the user preference and it will always user system preference. So if you don't wants to save search preference then glide.knowman.save_portal_search_sort_field_user_preference should be false else it should be true.Related Problem: PRB1767594