setCurrentByPKey(PKey, mode)

Selects an element of the list. If the selection happens after adding an item, the mode parameter is used to notify the framework. This is required for certain master detail scenarios on phones where the added item detail must be shown.

Required Editions

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

Parameters

  • PKey: The primary key of the item to select.
  • mode: Enum. Flag that is used to identify whether the selection happens while adding an item (ListModel.currentChangedMode.ADD).