Loading
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Data Sorting in Ascending or Descending Order

          Data Sorting in Ascending or Descending Order

          The orderCriteria sorts the List Item (LI) of a List Object (LO).

          Required Editions

          Available in Lightning Experience in Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled.

          The child element, orderCriterion, sorts the list based on the input values. If more than one element is defined, then the first defined value is sorted and the list is further sorted based on the subsequent defined values.

          The supported attributes are:

          Attribute Description Data Type Required
          fieldName Contains the name of the LI field of the LO to sort by. String Yes
          direction

          Direction of sorting order. Supported values are:

          • ASC: ascending order
          • DESC: descending order
          String Yes
          compareMode

          Converts LI field values and literal value to string or number for filtering. Default is STRING. Supported values are:

          • STRING
          • NUMBER
          String No
          Example
          Example Here’s an example where the product ID is sorted in descending order:
          <orderCriteria>
          <orderCriterion fieldName="prdId" direction="DESC" compareMode="NUMBER" />
          </orderCriteria>
          
           
          Loading
          Salesforce Help | Article