Search code examples
salesforcesalesforce-lightningsalesforce-communitiessalesforce-flow

Site guest user cannot run Get Record element


In my site the guest users have access to the flow and they able to run the flow and even create records. When the flow try to find the created record the next error accrue: Because Get_Record is passed to an action, subflow, or Lightning component, store the values of all Request_for_ChemTox__c fields that the running user has access to. I gave access to every field for that user and still keep getting this error. Any ideas?


Solution

  • It's probably not field level security (~table columns) but whole record's security (~table rows).

    Check your site/community/experience settings as described in this article: https://help.salesforce.com/s/articleView?id=000352970&type=1. If there's something set - the ownership of created record is immediately transferred over to that internal user and guest loses visibility. It sucks but it's there to protect you, makes sure that if you have for example Leads or Cases submitted by guest users - they immediately "disappear", guest/hacker can't report on them, experiment with IDs in the url to learn other people's data...

    You can Check Setup -> Sharing Settings for this object and create new sharing rule. (I can't upload image right now but start making new sharing rule with step 2 "rule type = Guest user access, based on criteria")

    https://help.salesforce.com/s/articleView?id=sf.networks_guest_record_default_owner_best_practices.htm&type=5 has some good tips too:

    If you’d like to create a different experience for guest users, use flows in System Mode to redirect guest users to a different custom screen after they create a record