Open RealEvanPonter opened 3 years ago
@alexed1 I believe this is a limitation of LWC - not really sure what our options are. The same applies for any user that doesnt have access to the picklist values.
My other thought here would be to use GetPicklistValues and use that output to populate the QuickChoice values.
I am attempting to use a QuickChoice component on a screen flow that is being distributed on a community page to an unauthenticated Guest User. I set the flow to run in "System Context Without Sharing--Access All Data". The QuickChoice component is configured to display a Picklist using a Picklist field as the data source. I've selected an object and a field. Upon testing this flow, no picklist choices are visible. The console in the browser inspector shows:
getPicklistValues wire service returned error: {"status":403,"body":{"message":"You don't have access to this record. Ask your administrator for help or to request access.","statusCode":403,"errorCode":"INSUFFICIENT_ACCESS"},"headers":{}}
Within the source code for fsc_quickChoiceFSC.js I see:
import {getPicklistValues} from "lightning/uiObjectInfoApi";
Which seems to be accessing a function via the User Interface API from the Lightning Data Service (LDS).If I grant the Guest User profile Read access to the object and Read Access to the picklist field, then this QuickChoice component behaves as expected. I'm hoping I won't need to grant these permissions that so that tighter security can be enforced for this public community.
Please let me know if there's a better place to report this - I realize it might be something a different Salesforce team would handle, but wanted to start here in case there were any security settings or configurations that could be altered in this code base to allow for accessing Lightning Data Service in the same context that the flow is configured to run in.
Steps to reproduce
Steps to reproduce the behavior:
Expected behaviour
The QuickChoice component should display the picklist values from the selected field on the selected object
Actual behaviour
The QuickChoice component does not display any picklist values. An error can be seen in the console of the browser inspector:
'getPicklistValues wire service returned error: {"status":403,"body":{"message":"You don't have access to this record. Ask your administrator for help or to request access.","statusCode":403,"errorCode":"INSUFFICIENT_ACCESS"},"headers":{}}'
Screenshots
Flow property configuration
QuickChoice component configuration
Debug Logs
Debug Log Information
`getPicklistValues wire service returned error: {"status":403,"body":{"message":"You don't have access to this record. Ask your administrator for help or to request access.","statusCode":403,"errorCode":"INSUFFICIENT_ACCESS"},"headers":{}}`