SalesforceLabs / survey-force

85 stars 61 forks source link

Authorization Required Error #87

Closed jasonrMRAdmin closed 3 years ago

jasonrMRAdmin commented 3 years ago

Hello,

Due to the new Salesforce security enhancements, our surveys quit working. I've uninstalled and reinstalled the package in order to get the new "Publicly Available" field and believe I've followed the instructions but when I go to the Site, I get the "Authorization Required" error. I've preformed the following steps after the re-install:

  1. Created a Force.com site
  2. Gave the Guest user profile for that access to a. "Survey" Read access b. "Survey Question" Read access c. "Surveys Taken" Read and Create access d. "Survey Questions Responses" Read and Create access e. "Contacts" Read access f. "Cases" Read access
  3. Added the "Take Survey" VisualForce page to the list of enabled VisualForce pages
  4. Created a Sharing Rule for "Surveys" with the Criteria "Survey: Publicly Available EQUALS True" shared with the Site Guest User

Is there something I missed or did incorrectly? Any help would be greatly appreciated!

jrattanpal commented 3 years ago

Those are all the steps you needed. I cannot think of any other steps.

Can you collect debug logs for a Guest user? That should tell us exactly what is going on.

BTW, after you give CRUD access, make sure you also give access to all fields on those objects. You can compare your changes to "Survey Force - Guest" Permission set which comes with the package.

jasonrMRAdmin commented 3 years ago

The individual field access was the issue. Thanks so much for your help!

jrattanpal commented 3 years ago

That's great! I am glad it's working now.

I will update instructions to include this. This has come up second time hence I thought to ask that :)