Use this wire adapter to get the
RelatedList record count.
parentRecordId—(Required) The ID of the parent record that you want to get related lists for, like an Account ID.
relatedListId—(Required) The API name of a related list object such as Contacts, Opportunities, or Cases.
maxCount—(Optional) The maximum number of records to return. The default value is 20.
This code example fetches the record count for a related list.
- Understand the Wire Service
- Handle Errors in Lightning Data Service
- Salesforce Objects Supported by lightning/ui*Api Modules