Custom Search gets rearranged after saving
Problem Summary
Custom search with the given set of results display gets rearranged randomly after saving and viewing it.
Go to custom search, select the list of fields to be displayed under results display
Click on search and save the search with either 'Display results automatically' checked or un-checked
You will find that the column names are not in the order of the results display
Cause
Duplicate or corrupted field in the search view
Resolution
- Go to the desired object from the setup, navigate to search views and select the custom search being used.
- Under the Results tab from the list of fields available we need to find out the field which is causing the issue.
- This could be either that there is duplicate field present or a field that has been corrupted which needs to be removed.
- For finding out the duplicate field, we need to make sure that all the values given under 'Display key' are unique.
- It is not just the name but the paths given under each display key should not be repeated which leads to duplication.
- For the second reason of the issue to find out the corrupted field, we need to create a custom search from the scratch which isn't quite feasible
- So an easy way to do it is to create a copy of the custom search and mark it under 'used for'
- From the copied custom search which is like a test search, start omitting each field by testing it out at the UI.
- Once you notice that the results display show the same fields as the selected ones, the field that has been eliminated latest is the corrupted one.
- The duplicate or the corrupted field need to be removed or replaced with any other column name and display key.
- Now you can directly delete the field from the original custom search and make it the default one.
Verification
The saved custom searches when selected will show the same fields as selected after searching it or modifying to search it multiple times.