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);
}
}
}