getRelatedListRecordsBatch
Use this wire adapter to get records for a batch of RelatedLists
.
See Get a Batch of Related List Records with a Request Body.
Parameter Name | Type | Description | Required? |
---|---|---|---|
parentRecordId | String | The ID of the parent record that you want to get related lists for, like an Account ID. | |
relatedListParameters | Object | An array of related list parameter collections. |
relatedListParameters
has several properties.
relatedListParameters Property | Type | Description | Required? |
---|---|---|---|
relatedListId | String | The API name of a related list object, like Contacts, Opportunities, or Cases. | |
fields | String[] | The API names of the related list’s column fields. | |
optionalFields | String[] | The API names of additional fields in the related list. | |
pageSize | Number | The number of list records to return per page. | |
sortBy | String[] | An array of field API names to sort the related list by. Accepts only one value per request. | |
where | String | The filter to apply to related list records, in GraphQL syntax. |
data
—Simplified Batch Resultserror
—FetchResponse
This code example fetches a batch of related list records by parent ID and multiple related list objects, then iterates through the list of records.
See Also
- Understand the Wire Service
- Handle Errors in Lightning Data Service
- Salesforce Objects Supported by lightning/ui*Api Modules