lightning/stateManagerRelatedListRecords

This state manager gets RelatedList records. Related lists display details and links to records that are associated with a specific record. For example, an account can have related lists for contacts, cases, notes, or even files.

Related list records depend on the parent record ID and related list ID. All other parameters are optional.

setConfig()

Provide the entire configuration as an object. This function is equivalent to the factory function when you create the state manager.

setParentRecordId()

Set the ID of the parent record that you want to get related lists for, like an Account ID.

setRelatedListId()

Set the API name of a related list or child relationship, like Contacts, Opportunities, or Cases.

To provide an API name of a related list custom object, use the Custom_Objects__r format, where Custom_Objects is the plural form of your custom object name, and __r is the related list suffix. For more information on retrieving all related lists for an object or custom object, see RelatedListDefinition.

setFields()

Set the API names of the related list’s column fields. To use a standard field on a custom object, use the Custom_Object__c.FieldName format. To use a custom field on a custom object, use the Custom_Object__c.FieldName__c format.

setOptionalFields()

Set the API names of additional fields in the related list.

setPageSize()

Set the number of list records to return per page. The default value is 50. Enter a value between 1 and 1999.

setSortBy()

Set the array of field API names to sort the related list by. Accepts only one value per request.

setWhere()

Set filter to apply to related list records. Semi-joins and anti-joins filters are currently not supported. For example, passing in a query using inq results in a Malformed Join Input Object error.

status

The current status of the state manager. See status for details.

data

When status is "loaded", a Related List Record Collection.

error

When status is "error", this property contains details. See error for details.

See Also