lwc icon indicating copy to clipboard operation
lwc copied to clipboard

[lightning/uiGraphQLApi] : When querying a CustomSettings, error when CustomSetting Access is on a permissionSet in a permissionSetGroup.

Open elliot41 opened this issue 2 months ago • 1 comments

Description

[lightning/uiGraphQLApi] : When querying a CustomSettings, error when CustomSetting Access is on a permissionSet in a permissionSetGroup.

Steps to Reproduce

  1. Create a CustomSetting : TestCSErrorInLWC__c
  2. Give access to this customsetting in a permissionSet.
  3. Put this permissionSet into a PermissionSetGroup.
  4. Give a User access to the permissionSetGroup.

Expected Results

When you launch the query in the lwc component you should have access to the data of the custom setting.

Actual Results

Error is thrown : Validation error (FieldUndefined@[uiapi/query/TestCSErrorInLWC__c]) : Field 'TestCSErrorInLWC__c' in type 'RecordQuery' is undefined

Browsers Affected

Chrome

Possible Solution

As a workaround, we can add the permissionSet directly to the user (without the permissionSetGroup), or add the customsetting access directly to the profile.

Code snippet

Image

Error

Image

elliot41 avatar Oct 17 '25 06:10 elliot41

It looks like you're having trouble with the GraphQL wire adapter, which is outside the scope of this repo (the LWC framework). For help with your issue, I would recommend opening a Salesforce Stack Exchange question or a Salesforce case.

wjhsf avatar Oct 17 '25 13:10 wjhsf