Loading

Opportunity Product related list not sorted

Publiseringsdato: Aug 21, 2026
Beskrivelse

The Salesforce Opportunity Product related list Sort drop-down doesn't appear to work when adding a custom lookup field. This article explains why, and what fields are sortable on this related list.

Steps to Reproduce

  1. Create a new custom field (Data type: Lookup directed towards any standard or custom object) on the Opportunity Product object.
  2. Edit the page layout of the parent object and scroll down to the Opportunity Product related list, then click the wrench icon.
  3. Notice the "Sort" drop-down and select any field to sort ascending or descending.
Løsning

This article answers the question: why doesn't the Sort By drop-down work as expected on the Opportunity Product related list, and which fields can actually be sorted?

Default Sort Behavior

The Opportunity Product related list on any object is sorted by default based on Product Name. Sorting by another field isn't available for the standard related list, even though a Sort option is visible.

Select a field from the Sort By drop-down list to sort the items in the related list. Items display in ascending order unless you select Descending. The default sort order varies per record. The Sort By drop-down is not available for activities and opportunity products on the standard related list.

Sortable and Non-Sortable Fields

An IdeaExchange idea requesting this enhancement, Change sort order on opportunity product related list, has been delivered. Sorting is now available in Lightning Experience for the fields listed below.

For example, an admin who wants to sort the Opportunity Product related list by Quantity or Sales Price can now do so in Lightning Experience, but not by Product or List Price.

Sortable Fields

  • Created By
  • Date
  • Discount
  • Last Modified By
  • Line Description
  • Product Code
  • Quantity
  • Sales Price
  • Total Price

Not Sortable

  • List Price
  • Product

Note

This behavior only applies to related lists with custom lookup fields. It's working as designed that the standard related list doesn't include the "Sort by" option.

Knowledge-artikkelnummer

000387660

 
Laster
Salesforce Help | Article