getItemByPKey(pKeyValue)

Searches for an item within the list for the given PKey and returns it. Returns null if no items or multiple items have been found.

Required Editions

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

Parameters

pKey Value: Object

Returns

Object: The list item corresponding to the given pkey value.

Example
Example
Var list = SomeListObject
Var item = List.getItemByPKey("a16characterpkey")