Closed souravp2k5 closed 2 years ago
Can you capture and share Apex debug logs?
There is some missing configuration somewhere. Make sure that you have gone through ALL steps mentioned at https://github.com/SalesforceLabs/survey-force
Hi, I checked all possible access as per the link given above. But till the issue is present i.e It opens for the external user perfectly, but after filling up the survey , when they clicked finish, its not going to the "thank you" page, but showing permission required. although the survey responses are getting recorded in SF.
I tried the debug, but its not capturing any debug logs. What i did is after enable debug log, went to the contact page >activity>email > attached the template > Send email. Opened in inbox and filled up the survey.
Do i have to do any other process to capture the debug log or any suggestions plz ?
@souravp2k5
Yo uneed to capture debug logs for guest user. In addition to enabling debug log for guest user, you also need to set a cookie
Without that cookie, logs will not be captured for guest user.
Hi @jrattanpal , plz suggest
18:39:01.0 (812113)|CODE_UNIT_STARTED|[EXTERNAL]|0662I000002HM0P|VF: /apex/TakeSurvey
18:39:01.0 (1384604)|VF_DESERIALIZE_VIEWSTATE_BEGIN|0662I000002HM0P
18:39:01.0 (10060613)|HEAP_ALLOCATE|[79]|Bytes:3
18:39:01.0 (10158043)|HEAP_ALLOCATE|[84]|Bytes:152
18:39:01.0 (10175665)|HEAP_ALLOCATE|[399]|Bytes:408
18:39:01.0 (10191831)|HEAP_ALLOCATE|[412]|Bytes:408
18:39:01.0 (10206555)|HEAP_ALLOCATE|[520]|Bytes:48
18:39:01.0 (10231757)|HEAP_ALLOCATE|[139]|Bytes:6
18:39:01.0 (10338996)|HEAP_ALLOCATE|[52]|Bytes:5
18:39:01.0 (10367695)|HEAP_ALLOCATE|[58]|Bytes:5
18:39:01.0 (10377224)|HEAP_ALLOCATE|[66]|Bytes:7
18:39:01.0 (15275591)|VF_DESERIALIZE_VIEWSTATE_END
18:39:01.23 (23286119)|SYSTEM_MODE_ENTER|true
18:39:01.23 (23422351)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:38
18:39:01.23 (23461001)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:7
18:39:01.24 (24456022)|SYSTEM_MODE_ENTER|true
18:39:01.24 (24516631)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
18:39:01.24 (24529579)|VARIABLE_SCOPE_BEGIN|[88]|this|ApexPage.PageMessagesComponentController|true|false
18:39:01.24 (24690563)|VARIABLE_ASSIGNMENT|[88]|this|{}|0x3bdd2cb4
18:39:01.24 (24701180)|VARIABLE_SCOPE_BEGIN|[88]|escape|Boolean|false|false
18:39:01.24 (24713303)|VARIABLE_ASSIGNMENT|[88]|escape|null
18:39:01.0 (24847093)|SYSTEM_MODE_ENTER|true
18:39:01.0 (24868578)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:280
18:39:01.0 (24879210)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:47
18:39:01.0 (24884806)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:51
18:39:01.0 (24909606)|METHOD_ENTRY|[4]|01p2I000004YZRj|ViewSurveyController.ViewSurveyController()
18:39:01.0 (24917339)|STATEMENT_EXECUTE|[4]
18:39:01.0 (24929205)|STATEMENT_EXECUTE|[4]
18:39:01.0 (24938025)|SYSTEM_MODE_ENTER|false
18:39:01.0 (24946442)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:5
18:39:01.0 (24961994)|SYSTEM_MODE_EXIT|false
18:39:01.0 (24975324)|METHOD_EXIT|[4]|ViewSurveyController
18:39:01.0 (25056974)|SYSTEM_MODE_ENTER|true
18:39:01.0 (25227083)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:452
18:39:01.0 (25237477)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:59
18:39:01.0 (25250424)|METHOD_ENTRY|[10]|01p2I000004YZRW|SFQuestion.SFQuestion()
18:39:01.0 (25256742)|STATEMENT_EXECUTE|[10]
18:39:01.0 (25261365)|STATEMENT_EXECUTE|[10]
18:39:01.0 (25270369)|SYSTEM_MODE_ENTER|false
18:39:01.0 (25277793)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:5
18:39:01.0 (25284840)|SYSTEM_MODE_EXIT|false
18:39:01.0 (25293370)|METHOD_EXIT|[10]|SFQuestion
18:39:01.0 (25654083)|SYSTEM_MODE_ENTER|true
18:39:01.0 (25978118)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:48
18:39:01.0 (25999980)|VARIABLE_SCOPE_BEGIN|[84]|this|ViewSurveyController|true|false
18:39:01.0 (26122778)|VARIABLE_ASSIGNMENT|[84]|this|{"allQuestions":"0x1a3e3cc1","anonymousAnswer":"Anonymous","baseURL":"https://ABC.se (14 more) ...","caseId":"none","contactId":"0032I00003D2jv3","mySurvey":"0x5363bd12","runningUserString":"User ABC Site (10 more) ...","surveyId":"a252I000006TMtGQAW","surveyThankYouText":"Thanks for taking th (23 more) ...","thankYouRendered":false}|0x12727632
18:39:01.0 (26143296)|SYSTEM_MODE_ENTER|false
18:39:01.0 (26152062)|HEAP_ALLOCATE|[85]|Bytes:5
18:39:01.0 (26158233)|STATEMENT_EXECUTE|[84]
18:39:01.0 (26160914)|STATEMENT_EXECUTE|[85]
18:39:01.0 (26221000)|HEAP_ALLOCATE|[85]|Bytes:101
18:39:01.0 (26239339)|SYSTEM_METHOD_ENTRY|[1]|UserInfo.UserInfo()
18:39:01.0 (26245340)|STATEMENT_EXECUTE|[1]
18:39:01.0 (26254586)|SYSTEM_METHOD_EXIT|[1]|UserInfo
18:39:01.0 (26270338)|METHOD_ENTRY|[85]||System.UserInfo.getUserType()
18:39:01.0 (26322684)|METHOD_EXIT|[85]||System.UserInfo.getUserType()
18:39:01.0 (26329163)|HEAP_ALLOCATE|[85]|Bytes:5
18:39:01.0 (26362785)|HEAP_ALLOCATE|[85]|Bytes:5
18:39:01.0 (26369567)|SYSTEM_MODE_EXIT|false
18:39:01.0 (26376930)|HEAP_ALLOCATE|[85]|Bytes:5
18:39:01.28 (28749786)|SYSTEM_MODE_ENTER|true
18:39:01.28 (28809916)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:8
18:39:01.28 (28821618)|VARIABLE_SCOPE_BEGIN|[88]|this|ApexPage.PageMessagesComponentController|true|false
18:39:01.28 (28878663)|VARIABLE_ASSIGNMENT|[88]|this|{}|0x3bdd2cb4
18:39:01.28 (28886118)|VARIABLE_SCOPE_BEGIN|[88]|escape|Boolean|false|false
18:39:01.28 (28897443)|VARIABLE_ASSIGNMENT|[88]|escape|null
18:39:01.0 (29145693)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:1
18:39:01.0 (29163333)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:76
18:39:01.0 (29196852)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.selectedOption|"0"|0x18f4758d
18:39:01.0 (29327136)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12
18:39:01.0 (29333473)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:76
18:39:01.0 (29344143)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this.inputText|"Test Browser"|0x19364347
18:39:01.0 (29598574)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:48
18:39:01.0 (29611077)|VARIABLE_SCOPE_BEGIN|[167]|this|ViewSurveyController|true|false
18:39:01.0 (29676466)|VARIABLE_ASSIGNMENT|[167]|this|{"allQuestions":"0x1a3e3cc1","anonymousAnswer":"Anonymous","baseURL":"abc" (14 more) ...","caseId":"none","contactId":"0032I00003D2jv3","mySurvey":"0x5363bd12","runningUserString":"User ABC Site (10 more) ...","surveyId":"a252I000006TMtGQAW","surveyThankYouText":"Thanks for taking th (23 more) ...","thankYouRendered":false}|0x12727632
18:39:01.0 (29694555)|SYSTEM_MODE_ENTER|false
18:39:01.0 (29704896)|HEAP_ALLOCATE|[169]|Bytes:5
18:39:01.0 (29711697)|STATEMENT_EXECUTE|[168]
18:39:01.0 (29714442)|STATEMENT_EXECUTE|[169]
18:39:01.0 (29731294)|HEAP_ALLOCATE|[169]|Bytes:16
18:39:01.0 (29805427)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"allQuestions":"0x1a3e3cc1","anonymousAnswer":"Anonymous","baseURL":"ABC.se (14 more) ...","caseId":"none","contactId":"0032I00003D2jv3","mySurvey":"0x5363bd12","runningUserString":"User ABC Site (10 more) ...","surveyId":"a252I000006TMtGQAW","surveyThankYouText":"Thanks for taking th (23 more) ...","thankYouRendered":false}|0x12727632
18:39:01.0 (29838842)|HEAP_ALLOCATE|[169]|Bytes:25
18:39:01.0 (29878653)|USER_DEBUG|[169]|DEBUG|anonymousAnswer:Anonymous
18:39:01.0 (29888821)|STATEMENT_EXECUTE|[171]
18:39:01.0 (30018774)|HEAP_ALLOCATE|[171]|Bytes:4
18:39:01.0 (30121960)|VARIABLE_SCOPE_BEGIN|[171]|sqrList|List
18:39:01.130 (130743623)|CUMULATIVE_LIMIT_USAGE_END
18:39:01.0 (132580049)|CODE_UNIT_FINISHED|SurveyQuestionResponse on SurveyQuestionResponse trigger event BeforeInsert|sfdc_trigger/SurveyQuestionResponse 18:39:01.0 (186459604)|CODE_UNIT_STARTED|[EXTERNAL]|01q2I00000104Xf|SFSurveyQuestionTrigger on Survey_Question trigger event BeforeUpdate|sfdc_trigger/SFSurveyQuestionTrigger 18:39:01.0 (186521191)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12 18:39:01.0 (186583835)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12 18:39:01.0 (186751949)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4 18:39:01.0 (186769898)|VARIABLE_SCOPE_BEGIN|[1]|this|SFSurveyQuestionTrigger|true|false 18:39:01.0 (186817556)|VARIABLE_ASSIGNMENT|[1]|this|{}|0xdaf7fe0 18:39:01.0 (186862408)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:4 18:39:01.0 (186870909)|VARIABLE_SCOPE_BEGIN|[1]|this|SFSurveyQuestionTrigger|true|false 18:39:01.0 (186886383)|VARIABLE_ASSIGNMENT|[1]|this|{}|0xdaf7fe0 18:39:01.0 (186894557)|STATEMENT_EXECUTE|[1] 18:39:01.0 (187148284)|HEAP_ALLOCATE|[2]|Bytes:5 18:39:01.0 (187175538)|HEAP_ALLOCATE|[2]|Bytes:4 18:39:01.0 (187187341)|VARIABLE_SCOPE_BEGIN|[2]|sq|Survey_Questionc|true|false 18:39:01.0 (187587917)|VARIABLE_ASSIGNMENT|[2]|sq|{"LastModifiedDate":"2022-01-13T18:31:49.000Z","IsDeleted":false,"Surveyc":"a252I000006TMtGQAW","Requiredc":true,"OrderNumberc":0,"CurrencyIsoCode":"USD","Name":"How are you ?","SystemModstamp":"2022-01-13T18:31:49.000Z","CreatedById":"0052I00000HipmxQAB","Typec":"Single Select--Verti (3 more) ...","CreatedDate":"2022-01-04T18:03:42.000Z","Hide_on_Surveyc":false,"Choicesc":"Good\r\nBad","Id":"a242I00000WQLnbQAH","LastModifiedById":"0052I000008dsaeQAA","Question__c":"How are you ?","Total_Responsesc":47}|0x2ced5136 18:39:01.0 (187604724)|STATEMENT_EXECUTE|[2] 18:39:01.0 (187607412)|STATEMENT_EXECUTE|[3] 18:39:01.0 (187692301)|HEAP_ALLOCATE|[3]|Bytes:13 18:39:01.0 (187735936)|HEAP_ALLOCATE|[3]|Bytes:13 18:39:01.0 (187899564)|VARIABLE_ASSIGNMENT|[3]|this.Name|"How are you ?"|0x2ced5136 18:39:01.0 (187932459)|HEAP_ALLOCATE|[2]|Bytes:5 18:39:01.0 (187951108)|HEAP_ALLOCATE|[2]|Bytes:4 18:39:01.0 (187961668)|VARIABLE_SCOPE_BEGIN|[2]|sq|Survey_Questionc|true|false 18:39:01.0 (188124004)|VARIABLE_ASSIGNMENT|[2]|sq|{"LastModifiedDate":"2022-01-13T18:26:52.000Z","IsDeleted":false,"Surveyc":"a252I000006TMtGQAW","Requiredc":false,"OrderNumberc":1,"CurrencyIsoCode":"USD","Name":"Describe?","SystemModstamp":"2022-01-13T18:26:52.000Z","CreatedById":"0052I00000HipmxQAB","Typec":"Free Text","CreatedDate":"2022-01-04T18:04:16.000Z","Hide_on_Surveyc":false,"Id":"a242I00000WQLp8QAH","LastModifiedById":"0052I000008dsaeQAA","Questionc":"Describe?","Total_Responsesc":12}|0x6644508e 18:39:01.0 (188136381)|STATEMENT_EXECUTE|[2] 18:39:01.0 (188139205)|STATEMENT_EXECUTE|[3] 18:39:01.0 (188170275)|HEAP_ALLOCATE|[3]|Bytes:9 18:39:01.0 (188199543)|HEAP_ALLOCATE|[3]|Bytes:9 18:39:01.0 (188333442)|VARIABLE_ASSIGNMENT|[3]|this.Name|"Describe?"|0x6644508e 18:39:01.0 (188356569)|HEAP_ALLOCATE|[2]|Bytes:5 18:39:01.0 (188378629)|VARIABLE_ASSIGNMENT|[2]|sq|null| 18:39:01.188 (188393810)|CUMULATIVE_LIMIT_USAGE 18:39:01.188 (188393810)|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: 2 out of 150 Number of Publish Immediate DML: 0 out of 150 Number of DML rows: 3 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:39:01.188 (188393810)|CUMULATIVE_LIMIT_USAGE_END
18:39:01.0 (191312437)|CODE_UNIT_FINISHED|SFSurveyQuestionTrigger on Survey_Question trigger event BeforeUpdate|sfdc_trigger/SFSurveyQuestionTrigger 18:39:01.0 (218079498)|DML_END|[13] 18:39:01.0 (218150312)|HEAP_ALLOCATE|[EXTERNAL]|Bytes:12 18:39:01.0 (218178455)|SYSTEM_MODE_EXIT|true 18:39:01.0 (218732158)|METHOD_EXIT|[237]|01p2I000004YZRk|ViewSurveyControllerWithoutSharing.createSurveyQuestionResponse(List<SurveyQuestionResponsec>) 18:39:01.0 (218750680)|STATEMENT_EXECUTE|[238] 18:39:01.0 (218949904)|VARIABLE_ASSIGNMENT|[EXTERNAL]|this|{"allQuestions":"0x1a3e3cc1","anonymousAnswer":"Anonymous","baseURL":"https://ABC.se (14 more) ...","contactId":"0032I00003D2jv3","mySurvey":"0x5363bd12","runningUserString":"User ABC Site (10 more) ...","surveyId":"a252I000006TMtGQAW","surveyTakerId":"a232I000003oFPhQAM","surveyThankYouText":"Thanks for taking th (23 more) ...","thankYouRendered":false}|0x12727632 18:39:01.0 (218976755)|VARIABLE_ASSIGNMENT|[EXTERNAL]|value|true 18:39:01.0 (218989632)|HEAP_ALLOCATE|[25]|Bytes:5 18:39:01.0 (219007338)|VARIABLE_ASSIGNMENT|[25]|this.thankYouRendered|true|0x12727632 18:39:01.0 (219020864)|STATEMENT_EXECUTE|[239] 18:39:01.0 (219032941)|HEAP_ALLOCATE|[239]|Bytes:32 18:39:01.0 (219072252)|USER_DEBUG|[239]|DEBUG|setting thankyourendered to true 18:39:01.0 (219146111)|HEAP_ALLOCATE|[252]|Bytes:9 18:39:01.0 (219216981)|STATEMENT_EXECUTE|[252] 18:39:01.0 (219220202)|STATEMENT_EXECUTE|[253] 18:39:01.0 (219267339)|VARIABLE_SCOPE_BEGIN|[253]|pr|System.PageReference|true|false 18:39:01.0 (219427043)|VARIABLE_ASSIGNMENT|[253]|pr|"thanks buddy"|0x7f4c3a42 18:39:01.0 (219435807)|STATEMENT_EXECUTE|[254] 18:39:01.0 (219448891)|SYSTEM_MODE_EXIT|false 18:39:01.246 (246318409)|CUMULATIVE_LIMIT_USAGE 18:39:01.246 (246318409)|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: 2 out of 150 Number of Publish Immediate DML: 0 out of 150 Number of DML rows: 3 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:39:01.246 (246318409)|CUMULATIVE_LIMIT_USAGE_END
18:39:01.0 (246406454)|CODE_UNIT_FINISHED|VF: /apex/TakeSurvey 18:39:01.0 (246430479)|EXECUTION_FINISHED
Based on the logs, it all looks good. I don't see any errors. Did you make any changes to the code?
Hi, The contact got the email, all survey page showing up, But after filling the questionnaire, while clicked on submitting, Its showing authorization required error ( and not showing up the "Thank You" page), although the response is getting stored in SF.
I checked all the needed access and permissions But not able to figure out which permission is missing for this one, Can you plz suggest ?