0

I want to fetch the PermissionSetGroup assigned to current logged in user. I try to use getRelatedListRecords function from lightning/uiRelatedListApi. I have implemented the following code but I am getting some error. I try to print the error, but getting proxy in it so little unclear on the error too.

code :

import { LightningElement, wire } from 'lwc';
import currentUserId from '@salesforce/user/Id';
import { getRelatedListRecords } from 'lightning/uiRelatedListApi';

export default class TestComponent extends LightningElement {
    @wire(getRelatedListRecords, {
        parentRecordId: currentUserId,
        relatedListId: 'PermissionSetAssignments',
        fields: ['PermissionSetAssignment.PermissionSetGroupId']
    })listInfo({ error, data }) {
        if (data) {
            console.log('line 12 ', data);
        } else if (error) {
           console.log('line 14 ',error);
        }
    }
}

1 Answer 1

1

The error you're getting is:

The related lists UI API currently does not support this related list

Unfortunately, not all objects are supported by the UI API, and this appears to be a limitation. You'll need to write Apex for this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .