Sample Flow Without Sharing: Give Guest Users Access to Create and Read Records in One Flow
In this sample flow, the guest user enters details to report a support issue and the flow creates a case. After the guest user creates the record, a default active user becomes the owner of the record and the guest user doesn’t have direct access to it. The flow then retrieves the new case to get the case’s CaseNumber and Status fields and displays those fields to the guest user. Because the guest user doesn’t own the record after creation and the flow must retrieve the record, the flow runs without sharing.
Because the flow creates a record and then retrieves the record without sharing, set the How to Run the Flow setting to System Context Without Sharing—Access All Data.
Case Form (1)
The first element in the flow is a screen that displays these input components:
A Text component for the company’s name
A Name component for the submitter’s name
An Email component for the submitter’s email address
A Phone component for the submitter’s phone number
A Picklist component with option values from the record type’s Type_Options field
A Picklist component with option values from the record type’s Reason_Options field
A Text component for the subject of the case
A Long Text Area component for the description of the case
Assignment (2)
The second element assigns the data from the input components to a new Case record variable.
Create Records (3)
The next element is a Create Records element that uses the Case record variable to create a Case record. In addition to the information entered by the guest user, set the element configuration to define the case’s origin field as Web.
Get Records (4)
The Get Records element retrieves the new record by its Id field that is automatically defined by the Create Records element. The retrieved record is stored in a new Case record variable.
End Screen (5)
The final screen element displays the Case’s CaseNumber and Status fields from the Get Record element’s Case record variable.