Skip to main content

Customizing Sorting Order in the List View

ERPNext allows you to customize the default sorting order of records in a DocType’s List View. You can choose both the field used for sorting and whether the records should appear in ascending or descending order.

For example, if you want the Item list to display records in descending order based on Item Code, you can configure the sorting preferences using Customize Form.

1. Open Customize Form

  1. Go to Home > Customization > Form Customization > Customize Form.
  2. Select the DocType whose list view you want to customize.

2. Configure the Sorting Options

In the Customize Form, locate the sorting properties and configure them as required.

  • Sort Field: Select the field that should be used for sorting the records. For example, choose Item Code to sort items by their codes.
  • Sort Order: Select how the records should be arranged.
    • Asc – Displays records in ascending order.
    • Desc – Displays records in descending order.

The selected Sort Field determines the basis of sorting, while the Sort Order controls whether the records appear in ascending or descending order.

3. Save the Changes

  1. Click Update to save the customization.
  2. Refresh the List View to see the updated sorting order.

4. Benefits

  • Displays records in a consistent and meaningful order.
  • Improves navigation in list views.
  • Supports sorting based on any suitable field in the DocType.
  • Allows both ascending and descending sorting based on business requirements.
Rating: 0 / 5 (0 votes)