Description
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:
- Install the FlowScreenComponentsBasePack v2.1.3 package
- Create a screen flow
- Set the "How to Run the Flow" setting to "System Context Without Sharing-Access All Data"
- Add a screen element to the canvas
- Add the QuickChoice element to the screen
- Configure the component to display choices from a picklist field on an object
- Save and activate the flow
- Create a community
- Allow guest users to access the community
- Ensure that the guest user profile has all the necessary permissions to run flows
- Add a flow element to a community page - select the flow created above
- Save and publish the community
- Navigate to the public webpage that display this flow
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
QuickChoice component configuration