function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Great FushnikiGreat Fushniki 

Flow error when flow accessed through site but not visualforce page

I have a Flow that calculates commissions for real estate agents based on their possission in an agent hierarchy.  I would like the flow to be available via a site to access outside of the native salesforce environment.  The Flow works as desired when triggered from a Tab or Button inside Salesforce and runs with no errors, however when accessed via a Site, the initial screen is displayed, but after enteringa  value for the transaction to calculate from, an unhandled fault occurs.  The Flow accesses custom fields on the User Object as well as fields from another custom object to calculate commissions.

My hunch is that it is a permissions issue regarding the User object, but I am unable to solve the riddle.  Your help is greatly appreciated.
James LoghryJames Loghry
Sounds like a permissions issue to me at first thought.

Here's a few things you can do:
  1. Add a fault action to your flow to handle the fault.  E.g. Add a Record Create, then drag all your actions to the record create, and they should create a fault path.  In the record create, add the Fault.message (a global constant) to the record create.  Then you could write the faults to a custom fault object in Salesforce, checking for the fault.
  2. Next, check that your permissions are set correctly for the custom field and User object.  If it's a permission error, it could be either an FLS (Field Level Security) or a Sharing visibility issue.  
  3. If you're hitting the page from the anonymous site user, you'll want to check the "Public Access Settings" for your site or community and make sure the FLS is set properly for your fields.  
  4. Check to see if the User is set to "Private" visiblity (Setup->Security Controls->Sharing).  Again, if it's the anonymous site user, they won't be able to act on user records if the User "External Sharing" column is set to private.