SalesforceLabs / survey-force

88 stars 63 forks source link

"Some error occurred while saving the response" #47

Closed Ndonalies closed 4 years ago

Ndonalies commented 4 years ago

Recently implemented Survey Force. I installed it in Sandbox first and it worked perfectly. After few weeks of testing decided to install it in our Production org. Copied the same setup I did for sand box. Public access settings equal the following:

a. Read" access to "Survey" and "Survey Question" object. b. "Create" access for "Surveys Taken" and "Survey Question Responses" c. Read access set on the Accounts, Cases & Contacts Standard objects. d. Add the Visualforce page, "Take Survey" to the list of enabled Visualforce pages. e. Add the following to Enabled Apex Class Access: i. SurveyAndQuestionController ii. SurveyAndQuestionController_Test iii. SurveyManagerController iv. SurveyManagerController_Test v. viewShareSurveyComponentController vi. viewShareSurveyComponentController_Test vii. viewSurveyResultsComponentController

Also created a public group to setup read only sharing on the Account, Contacts, and Case objects.

Everything appears to be the same as I have it in sandbox, although every time you hit submit survey you get the an error saying "Some error occurred while saving the response". This even happens when you use the anonymous link. Which makes me think its not a permission issue with the contact or account because its not being tied to one.

Thanks for your help.

jrattanpal commented 4 years ago

There seems to be another issue in play here. Did you assign proper permission to the Site Guest user?

You can check for errors by enabling and capturing debug logs for site guest user (https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_debugging_guest_user.htm)

Ndonalies commented 4 years ago

Here is what the debug log returns:

47.0 APEX_CODE,FINEST;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO 18:41:58.0 (145606)|USER_INFO|[EXTERNAL]|0053j00000AhyTl|survey@upmcprovider-survey.force.com|(GMT+00:00) Greenwich Mean Time (GMT)|GMTZ 18:41:58.0 (189285)|EXECUTION_STARTED 18:41:58.0 (196433)|CODE_UNIT_STARTED|[EXTERNAL]|0663j000003AgIT|VF: /apex/Unauthorized 18:41:58.32 (32302855)|CUMULATIVE_LIMIT_USAGE 18:41:58.32 (32302855)|LIMIT_USAGE_FOR_NS|(default)| Number of SOQL queries: 0 out of 100 Number of query rows: 0 out of 50000 Number of SOSL queries: 0 out of 20 Number of DML statements: 0 out of 150 Number of DML rows: 0 out of 10000 Maximum CPU time: 0 out of 10000 Maximum heap size: 0 out of 6000000 Number of callouts: 0 out of 100 Number of Email Invocations: 0 out of 10 Number of future calls: 0 out of 50 Number of queueable jobs added to the queue: 0 out of 50 Number of Mobile Apex push calls: 0 out of 10

18:41:58.32 (32302855)|CUMULATIVE_LIMIT_USAGE_END

18:41:58.0 (32394817)|CODE_UNIT_FINISHED|VF: /apex/Unauthorized 18:41:58.0 (35365509)|EXECUTION_FINISHED

On Wed, Nov 27, 2019 at 11:59 AM jrattanpal notifications@github.com wrote:

There seems to be another issue in play here. Did you assign proper permission to the Site Guest user?

You can check for errors by enabling and capturing debug logs for site guest user ( https://releasenotes.docs.salesforce.com/en-us/winter17/release-notes/rn_forcecom_debugging_guest_user.htm )

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/survey-force/issues/47?email_source=notifications&email_token=AN4ROVVH7HQFLENI5WDLIPLQV2RNPA5CNFSM4JSJVWF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFKESAA#issuecomment-559171840, or unsubscribe https://github.com/notifications/unsubscribe-auth/AN4ROVSPHPTQVR2XBTRE7JLQV2RNPANCNFSM4JSJVWFQ .

jrattanpal commented 4 years ago

There should be multiple debug logs. The other one should have the error message.

Another option is:

That should the error message (hopefully). But debug log is better as it can tell us where