[bug] sfpegList_CTL - AggregateResult SObject types are not supported
Describe the bug In the sfpegList cmp when we define a SOQL query with AggregateResult and don't bypassFLS in the MDT record, an exception is thrown in the Apex class sfpegList_CTL
To Reproduce Steps to reproduce the behavior:
- Go to CMT record
- Put a SOQL query with a count for example 3-FATAL_ERROR| System.AuraHandledException: Script-thrown exception is thrown
Expected behavior The list is shown
Additional context
The error is thrown in line 556: SObjectAccessDecision securityDecision = Security.stripInaccessible(AccessType.READABLE, results);
@Mchaouche Why cannot you simply bypass FLS for this query ? I would not understand why you would not display all aggregation dimensions in the results, as it would result in possible duplicate lines with same other aggregation values.
FYI @jstukas
Hello @pegros Yes this is what we've done but i think the code should handle this exception, this is why i logged this issue to let you know, if you did not.
Thanks
I may catch the exception but would then probably return an empty list in such a case. @Mchaouche
FYI, a custom permission may be set on the sfpegList configuration to control who actually has access to the query with bypassFLS activated.