Newer Version Available

This content describes an older version of this product. View Latest

Get Related List Records

Returns record data for a related list.
Resources
1/ui-api/related-list-records/${parentRecordId}/${relatedListId}
  • parentRecordId—The ID of the record you want to get related lists for.
  • relatedListId—The ID of a supported related list for that object, such as Contracts.
Available Version
50.0
HTTP Method
GET
Example
To get metadata for the Contracts related list for the account record 001RM000003UNu6YAG, make this request:
1/services/data/v54.0/ui-api/related-list-records/001RM000003UNu6YAG/Contracts
To get metadata for the Contracts related list for the account record 001RM000003UNu6YAG, and also retrieve the ContractNumber field, make this request:
1/services/data/v54.0/ui-api/related-list-records/001RM000003UNu6YAG/Contracts?fields=Contract.ContractNumber
Request Parameters
Parameter Name Type Description Required or Optional Available Version
fields String[] Additional fields queried for the records returned. These fields are included in the response body and don’t create visible columns. If the field is not available to the user, an error occurs. Optional 50.0
optionalFields String[] Additional fields queried for the records returned. These fields are included in the response body and don’t create visible columns. If the field is not available to the user, no error occurs and the field isn’t included in the records. Optional 50.0
pageSize Integer The number of list records viewed at one time. The default value is 50. Value can be 1–2000. Optional 50.0
pageToken String A token that represents the page offset. To indicate where the page starts, use this value with the pageSize parameter. The maximum offset is 2000 and the default is 0. Optional 50.0
sortBy String[] The API name of the field the list view is sorted by. If the name is preceded with -, the sort order is descending. For example, Name sorts by name in ascending order. -CreatedDate sorts by created date in descending order. Accepts only one value per request. Optional 50.0
Response Body
Related List Record Collection