orderBy({Object}parameters)

Sorts the list items according to the given sort parameters.

Required Editions

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

Parameters

{Object} parameters: Sorts parameters of the form {"sortKey1": <direction>, "sortKey2":<direction>, ... }, where direction can be:

  • ASC: Ascendant
  • DESC: Descendant

Returns

Example
Example
this.orderBy({ "customerName": "ASC", "dateFrom": "DESC" });