---
schema_version: "1"
id: 9e74921935e468abeb1773353e29246ac8e02d2912f4bdc6e4cb6d2c04b5fba2
title: getNextListItemPKey (record)
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/ind/264-0-0/cg_modeler_listobject_get_next_listitem_pkey.md
canonical_url: https://help.salesforce.com/s/articleView?id=ind.cg_modeler_listobject_get_next_listitem_pkey.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f089d515604bfc34cd90f77f8c2c7d15fbaec41092432cfcef9b21608a3fac6d
description: Returns the PKey value of the next item in the list.
products:
  - Consumer Goods
release: "264"
---
# getNextListItemPKey (record)

Returns the PKey value of the next item in the list.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience in <strong>Professional</strong>, <strong>Unlimited</strong>, and <strong>Enterprise</strong> Editions that have Consumer Goods Cloud enabled.</td></tr></tbody></table>

## Parameters

record: Object. List item in the list.

## Returns

PKey value of the next visible item in the list or null if <record> was the last item.

## Remarks

- The same method exists for getPreviousListItemPKey, getLastItemPKey, and getFirstItemPKey.
- The methods getNextListItem, getPreviousListItem, getLastListItem, and getFirstListItem return the item rather than the PKey value.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-ind-consumer_goods_retail_vscode_modeler-264-0-0-production-enus/87cab158-9245-45b0-9080-f17a57d69ec9/images/icon_example.png)

Example

```
<Action name="GetNextSelectedListItem" actionType="LOGIC" call="ProcessContext::DailyReportList.getNextListItemPKey">
  <Parameters><Input name="record" value="ProcessContext::CurrentListItem" />
  </Parameters>
  <Return name="ProcessContext::NextSelectedListItem" />
  <TransitionTo action="ReloadDailyReportList" />
</Action>
```