You are here:
List Model
List Model is the base class for all list objects. It isn’t meant to be accessed directly, but provides methods for all objects that inherit from this class.
Required Editions
| Available in: Lightning Experience in Professional, Unlimited, and Enterprise Editions that have Consumer Goods Cloud enabled. |
- addObjectItems(objectList)
Adds the given items to the internal object list. - addItemsIncremental(jsonDataList, loadParams, itemComparisonParams)
Add items to a list without removing the existing items and without adding duplicates. The method also performs postLoadItemUpdates if the method exists for the given LO. - getAllItems()
Returns all existing items in the list object. - getNextListItemPKey (record)
Returns the PKey value of the next item in the list. - getItemObjects()
Returns an array of list items that match the currently applied filters. Call this method for UI-Binding only. Use getAllItems() if you want to get all existing items in the list. - 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. - getItemsByParam(JSONParams)
Returns an array of items that match the parameters. - getItemsByParamArray(ArrayOfParams, ArrayOfSortCriteria)
Returns an array of items that can be iterated. - isFiltered()
Checks if filters are set on a list. - orderBy({Object}parameters)
Sorts the list items according to the given sort parameters. - removeAllItems()
Removes all items from the list object. - removeItems(pKeyList)
Removes all items corresponding to the given list of PKeys. - resetAllFilters()
Resets all filters on this object list. - resetFilter(fieldName)
You can reset a filter applied on one property. Resets the filter on the given attribute name. - resumeListRefresh()
Resumes sending events after calling suspendListRefresh(). - 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. - setFilter(fieldName, value, operator)
Filters the list object based on a filter property value and the operator specified. - setFilterArray([{"fieldName":"value", "op": "operator"}, ... ])
Filters the list object based on the filter property array values and the operator specified. - suspendListRefresh()
Prevents the list item store from sending
Did this article solve your issue?
Let us know so we can improve!

