-
Notifications
You must be signed in to change notification settings - Fork 519
IterationRecipes
albarivas edited this page Nov 30, 2021
·
12 revisions
Demonstrates how to iterate on lists and sets
Demonstrates how to use a REST API client that leverages the Iterator interface. This example iterates on a paginated record list. Records are represented as strings for simplicity. Remote records are retrieved on the fly by IterableApiClient when the Iterator is accessed.
Type
List<String>
Description
List<String> the 'records' retrieved
Demonstrates how to iterate on a list of SObject thanks to the Iterable and Iterator interfaces. This example iterates on Accounts to sum the 'number of employees' field values (use the SUM SOQL function for a real-life application).
| Param | Description |
|---|---|
accounts |
a list of accounts that will be iterated on |
Type
Integer
Description
Integer the total number of employees for the accounts