I am trying to use getRelatedListRecords, it is working well with standard object, so I am getting related Contacts of Account record successfully but I cannot get related Xy Recipes records(object api name: XyRecipe__c, Tab name plural: Xy Recipes) so do I need to activate anything i Salesforce to make use of custom related list or why I am not able to use it just like Contacts list successfully? here is the code:
import { LightningElement, api, wire } from 'lwc';
import { getRelatedListRecords } from 'lightning/uiRelatedListApi';
export default class Xy_recipes_lwc extends LightningElement {
@api recordId;
@wire(getRelatedListRecords, {
parentRecordId: '$recordId',
relatedListId: 'Xy Recipes',
}) agendaExceptionsHandler({data, error}) {
if(data) {
console.log('Response for getrelatedrecords: ', JSON.stringify(data));
}
if(error) {
console.log('Error from getRelatedList 4: ', error);
}
}
}```