I'm trying to display related list of OpportunityLineItem in a LWC which is used in recordDetail page in Community for Opportunity. However I encounter this error (note I log in as System Administrator user, so I can access to all records):
{"status":400,"body":{"message":"The related lists UI API currently does not support this related list","statusCode":400,"errorCode":"INVALID_TYPE"},"headers":{},"ok":false,"statusText":"Bad Request","errorType":"fetchResponse"}
@wire(getRelatedListRecords, {
parentRecordId: '0068b00001Q1bo4AAB',
relatedListId: 'OpportunityLineItems',
fields: ['OpportunityLineItem.Id','OpportunityLineItem.UnitPrice','OpportunityLineItem.ProductCode'],
sortBy: ['OpportunityItemLine.ProductCode']
})lineItemsInfo({error, data}) {
if(data){
this.records = data.records;
} else if(error){
console.log(JSON.stringify(error));
}
};
Any suggestion, please! Thanks!