Closed juarezcolby closed 4 years ago
Hi
I have to test entire app again with this enabled. It’s possible that this may not work with the new features although custom permissions may make it possible.
I have to test all aspects and see if I can fix this or find a workaround for the issue if I can.
On Mon, Jan 20, 2020 at 6:25 PM juarezcolby notifications@github.com wrote:
I think I am affected by the most recent security updates in salesforce. The users use to be able to fill out a survey and submit the info back and it would say who the contact was that did this. The users are able to submit back the survey but now the contact info is blank. I have double-checked that they have the correct permission set on the site guest user profile.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/survey-force/issues/51?email_source=notifications&email_token=ABV6HLCFMKB2I7SH3AOJJFLQ6YXFZA5CNFSM4KJLECLKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IHPHTYA, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV6HLEHIMBJ4CHE6DJ7OZLQ6YXFZANCNFSM4KJLECLA .
--
Jaswinder Rattanpal www.rattanpal.com
Thank you for your feedback Jaswinder its a great tool and I would hate to lose this feedback from customers.
Great news. I was able to figure out a fix.
That's one way around it where we can update that field via trigger which will bypass sharing.
Please test and let me know
I am still running into some issues with submitting back the results from guest user can you see the debugger below.
sample survey: http://agrian.force.com/survey/TakeSurvey?id=a1L3A000002Yo4cUAC&caId=none&cId=0033A000026RNxe
37.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO 20:10:57.0 (117343)|USER_INFO|[EXTERNAL]|0053A00000CY53F|survey@agrian.force.com|Greenwich Mean Time|GMTZ 20:10:57.0 (184841)|EXECUTION_STARTED 20:10:57.0 (193178)|CODE_UNIT_STARTED|[EXTERNAL]|0663A000001iY5x|VF: /apex/TakeSurvey 20:10:57.0 (614092)|VF_DESERIALIZE_VIEWSTATE_BEGIN|0663A000001iY5x 20:10:57.0 (10345551)|VF_DESERIALIZE_VIEWSTATE_END 20:10:57.13 (13939226)|SYSTEM_MODE_ENTER|true 20:10:57.23 (23973545)|SYSTEM_MODE_ENTER|true 20:10:57.0 (24214741)|SYSTEM_MODE_ENTER|true 20:10:57.0 (24258046)|SYSTEM_MODE_ENTER|false 20:10:57.0 (24274849)|SYSTEM_MODE_EXIT|false 20:10:57.0 (24402523)|SYSTEM_MODE_ENTER|true 20:10:57.0 (24590557)|SYSTEM_MODE_ENTER|false 20:10:57.0 (24603456)|SYSTEM_MODE_EXIT|false 20:10:57.0 (25499514)|SYSTEM_MODE_ENTER|true 20:10:57.27 (27052166)|SYSTEM_MODE_ENTER|true 20:10:57.0 (28381739)|SYSTEM_MODE_ENTER|false 20:10:57.0 (28453140)|USER_DEBUG|[269]|DEBUG|anonymousAnswer::Anonymous 20:10:57.0 (30836048)|SYSTEM_MODE_ENTER|true 20:10:57.0 (31766680)|SYSTEM_MODE_ENTER|true 20:10:57.0 (32535051)|SYSTEM_MODE_ENTER|true 20:10:57.0 (35819987)|SYSTEM_MODE_ENTER|true 20:10:57.0 (36674631)|SYSTEM_MODE_ENTER|true 20:10:57.0 (36847468)|SYSTEM_MODE_ENTER|true 20:10:57.0 (37145857)|SYSTEM_MODE_ENTER|true 20:10:57.0 (37201049)|SYSTEM_MODE_ENTER|true 20:10:57.0 (39075630)|SYSTEM_MODE_ENTER|true 20:10:57.0 (40840728)|EXCEPTION_THROWN|[189]|SFDCAccessControlException: Script-thrown exception 20:10:57.0 (40863018)|EXCEPTION_THROWN|[200]|SFDCAccessControlException: Script-thrown exception 20:10:57.0 (40878120)|EXCEPTION_THROWN|[82]|SFDCAccessControlException: Script-thrown exception 20:10:57.0 (41245984)|USER_DEBUG|[15]|DEBUG|ViewSurveyController:AddSurveyTaker():SFDCAccessControlExceptionAccess Violation:: NO_CREATE access violation for SurveyTakerc.Takenc 20:10:57.0 (41288430)|SYSTEM_MODE_EXIT|false 20:10:57.47 (47511165)|SYSTEM_MODE_ENTER|true 20:10:57.47 (47703611)|SYSTEM_MODE_ENTER|true 20:10:57.0 (48231949)|SYSTEM_MODE_ENTER|true 20:10:57.0 (48333348)|SYSTEM_MODE_ENTER|true 20:10:57.0 (49401970)|SYSTEM_MODE_ENTER|true 20:10:57.51 (51411990)|SYSTEM_MODE_ENTER|true 20:10:57.51 (51580558)|SYSTEM_MODE_ENTER|true 20:10:57.0 (82262930)|VF_SERIALIZE_VIEWSTATE_BEGIN|0663A000001iY5x 20:10:57.0 (85176324)|VF_SERIALIZE_VIEWSTATE_END 20:10:57.92 (92280318)|CUMULATIVE_LIMIT_USAGE 20:10:57.92 (92280318)|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
20:10:57.92 (92280318)|CUMULATIVE_LIMIT_USAGE_END
20:10:57.0 (92367491)|CODE_UNIT_FINISHED|VF: /apex/TakeSurvey 20:10:57.0 (93755015)|EXECUTION_FINISHED
I see NO_CREATE access violation for SurveyTakerc.Takenc
Have you given proper access to Guest user on that object and field?
I didn't have edit on SurveyTakerc.Takenc added this but results don't seem to be posting back to the survey question responses. 37.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO 21:42:40.0 (117524)|USER_INFO|[EXTERNAL]|0053A00000CY53F|survey@agrian.force.com|Greenwich Mean Time|GMTZ 21:42:40.0 (190537)|EXECUTION_STARTED 21:42:40.0 (200479)|CODE_UNIT_STARTED|[EXTERNAL]|0663A000001iY5x|VF: /apex/TakeSurvey 21:42:40.0 (388687)|VF_DESERIALIZE_VIEWSTATE_BEGIN|0663A000001iY5x 21:42:40.0 (6093178)|VF_DESERIALIZE_VIEWSTATE_END 21:42:40.8 (8737503)|SYSTEM_MODE_ENTER|true 21:42:40.17 (17899431)|SYSTEM_MODE_ENTER|true 21:42:40.0 (18128455)|SYSTEM_MODE_ENTER|true 21:42:40.0 (18172329)|SYSTEM_MODE_ENTER|false 21:42:40.0 (18188036)|SYSTEM_MODE_EXIT|false 21:42:40.0 (18301707)|SYSTEM_MODE_ENTER|true 21:42:40.0 (18496059)|SYSTEM_MODE_ENTER|false 21:42:40.0 (18509207)|SYSTEM_MODE_EXIT|false 21:42:40.0 (19395077)|SYSTEM_MODE_ENTER|true 21:42:40.20 (20929276)|SYSTEM_MODE_ENTER|true 21:42:40.0 (22085609)|SYSTEM_MODE_ENTER|false 21:42:40.0 (22190018)|USER_DEBUG|[269]|DEBUG|anonymousAnswer::Anonymous 21:42:40.0 (24327163)|SYSTEM_MODE_ENTER|true 21:42:40.0 (25131931)|SYSTEM_MODE_ENTER|true 21:42:40.0 (25401293)|SYSTEM_MODE_ENTER|true 21:42:40.0 (28682766)|SYSTEM_MODE_ENTER|true 21:42:40.0 (29483016)|SYSTEM_MODE_ENTER|true 21:42:40.0 (29640372)|SYSTEM_MODE_ENTER|true 21:42:40.0 (29971785)|SYSTEM_MODE_ENTER|true 21:42:40.0 (30027734)|SYSTEM_MODE_ENTER|true 21:42:40.0 (30070019)|SYSTEM_MODE_ENTER|true 21:42:40.0 (30445378)|USER_DEBUG|[396]|DEBUG|st:SurveyTakerc:{ContactTextc=0033A000026RNxe, Surveyc=a1L3A000002Yo4cUAC, Takenc=true, Casec=null, Userc=null} 21:42:40.0 (30493605)|DML_BEGIN|[397]|Op:Insert|Type:SurveyTakerc|Rows:1 21:42:40.0 (32099519)|CODE_UNIT_STARTED|[EXTERNAL]|Flow:01I3A000002o2mD 21:42:40.0 (32361558)|CODE_UNIT_FINISHED|Flow:01I3A000002o2mD 21:42:40.0 (36531263)|CODE_UNIT_STARTED|[EXTERNAL]|01q3A000000aU3E|SurveyTaken on SurveyTaker trigger event BeforeInsert|sfdc_trigger/SurveyTaken 21:42:40.37 (37045263)|CUMULATIVE_LIMIT_USAGE 21:42:40.37 (37045263)|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: 1 out of 150 Number of DML rows: 1 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
21:42:40.37 (37045263)|CUMULATIVE_LIMIT_USAGE_END
21:42:40.0 (38390179)|CODE_UNIT_FINISHED|SurveyTaken on SurveyTaker trigger event BeforeInsert|sfdc_trigger/SurveyTaken 21:42:40.0 (92980268)|DML_END|[397] 21:42:40.0 (93176439)|USER_DEBUG|[398]|DEBUG|st:SurveyTakerc:{ContactTextc=0033A000026RNxe, Surveyc=a1L3A000002Yo4cUAC, Takenc=true, Casec=null, Userc=null, Id=a1J3A00000bVNOoUAO} 21:42:40.0 (93726479)|DML_BEGIN|[342]|Op:Insert|Type:SurveyQuestionResponsec|Rows:6 21:42:40.0 (95957716)|CODE_UNIT_STARTED|[EXTERNAL]|Flow:01I3A000002o2mC 21:42:40.0 (96232978)|CODE_UNIT_FINISHED|Flow:01I3A000002o2mC 21:42:40.0 (114013822)|DML_END|[342] 21:42:40.0 (114107381)|EXCEPTION_THROWN|[342]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] 21:42:40.0 (114749825)|SYSTEM_MODE_EXIT|false 21:42:40.128 (128925139)|SYSTEM_MODE_ENTER|true 21:42:40.129 (129120440)|SYSTEM_MODE_ENTER|true 21:42:40.0 (129514379)|SYSTEM_MODE_ENTER|true 21:42:40.0 (129618146)|SYSTEM_MODE_ENTER|true 21:42:40.0 (130834429)|SYSTEM_MODE_ENTER|true 21:42:40.132 (132892975)|SYSTEM_MODE_ENTER|true 21:42:40.133 (133067303)|SYSTEM_MODE_ENTER|true 21:42:40.0 (142252195)|VF_SERIALIZE_VIEWSTATE_BEGIN|0663A000001iY5x 21:42:40.0 (145362063)|VF_SERIALIZE_VIEWSTATE_END 21:42:40.152 (152392897)|CUMULATIVE_LIMIT_USAGE 21:42:40.152 (152392897)|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 DML rows: 7 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
21:42:40.152 (152392897)|CUMULATIVE_LIMIT_USAGE_END
21:42:40.0 (152489099)|CODE_UNIT_FINISHED|VF: /apex/TakeSurvey 21:42:40.0 (153911680)|EXECUTION_FINISHED
--
I see INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY
Not sure which field it’s complaining about. I tested it in my new scratch org using guest survey force permission set and it worked.
It could be that you haven’t given view all to survey force. This is the main problem and can’t be avoided because survey__c owner is internal user. So either you give view all to guest user on that object or change owner of that record to guest user.
I listed this required on the readme page of github repo.
On Mon, Feb 3, 2020 at 4:50 PM juarezcolby notifications@github.com wrote:
I didn't have edit on SurveyTakerc.Takenc added this but results don't seem to be posting back to the survey question responses. 37.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;NBA,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,INFO 21:42:40.0 (117524)|USER_INFO|[EXTERNAL]|0053A00000CY53F| survey@agrian.force.com|Greenwich Mean Time|GMTZ 21:42:40.0 (190537)|EXECUTION_STARTED 21:42:40.0 (200479)|CODE_UNIT_STARTED|[EXTERNAL]|0663A000001iY5x|VF: /apex/TakeSurvey 21:42:40.0 (388687)|VF_DESERIALIZE_VIEWSTATE_BEGIN|0663A000001iY5x 21:42:40.0 (6093178)|VF_DESERIALIZE_VIEWSTATE_END 21:42:40.8 (8737503)|SYSTEM_MODE_ENTER|true 21:42:40.17 (17899431)|SYSTEM_MODE_ENTER|true 21:42:40.0 (18128455)|SYSTEM_MODE_ENTER|true 21:42:40.0 (18172329)|SYSTEM_MODE_ENTER|false 21:42:40.0 (18188036)|SYSTEM_MODE_EXIT|false 21:42:40.0 (18301707)|SYSTEM_MODE_ENTER|true 21:42:40.0 (18496059)|SYSTEM_MODE_ENTER|false 21:42:40.0 (18509207)|SYSTEM_MODE_EXIT|false 21:42:40.0 (19395077)|SYSTEM_MODE_ENTER|true 21:42:40.20 (20929276)|SYSTEM_MODE_ENTER|true 21:42:40.0 (22085609)|SYSTEM_MODE_ENTER|false 21:42:40.0 (22190018)|USER_DEBUG|[269]|DEBUG|anonymousAnswer::Anonymous 21:42:40.0 (24327163)|SYSTEM_MODE_ENTER|true 21:42:40.0 (25131931)|SYSTEM_MODE_ENTER|true 21:42:40.0 (25401293)|SYSTEM_MODE_ENTER|true 21:42:40.0 (28682766)|SYSTEM_MODE_ENTER|true 21:42:40.0 (29483016)|SYSTEM_MODE_ENTER|true 21:42:40.0 (29640372)|SYSTEM_MODE_ENTER|true 21:42:40.0 (29971785)|SYSTEM_MODE_ENTER|true 21:42:40.0 (30027734)|SYSTEM_MODE_ENTER|true 21:42:40.0 (30070019)|SYSTEM_MODE_ENTER|true 21:42:40.0 (30445378)|USER_DEBUG|[396]|DEBUG|st:SurveyTakerc:{ContactTextc=0033A000026RNxe, Surveyc=a1L3A000002Yo4cUAC, Takenc=true, Casec=null, Userc=null} 21:42:40.0 (30493605)|DML_BEGIN|[397]|Op:Insert|Type:SurveyTakerc|Rows:1 21:42:40.0 (32099519)|CODE_UNIT_STARTED|[EXTERNAL]|Flow:01I3A000002o2mD 21:42:40.0 (32361558)|CODE_UNIT_FINISHED|Flow:01I3A000002o2mD 21:42:40.0 (36531263)|CODE_UNIT_STARTED|[EXTERNAL]|01q3A000000aU3E|SurveyTaken on SurveyTaker trigger event BeforeInsert|sfdc_trigger/SurveyTaken 21:42:40.37 (37045263)|CUMULATIVE_LIMIT_USAGE 21:42:40.37 (37045263)|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: 1 out of 150 Number of DML rows: 1 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
21:42:40.37 (37045263)|CUMULATIVE_LIMIT_USAGE_END
21:42:40.0 (38390179)|CODE_UNIT_FINISHED|SurveyTaken on SurveyTaker trigger event BeforeInsert|sfdc_trigger/SurveyTaken 21:42:40.0 (92980268)|DML_END|[397] 21:42:40.0 (93176439)|USER_DEBUG|[398]|DEBUG|st:SurveyTakerc:{ContactTextc=0033A000026RNxe, Surveyc=a1L3A000002Yo4cUAC, Takenc=true, Casec=null, Userc=null, Id=a1J3A00000bVNOoUAO} 21:42:40.0 (93726479)|DML_BEGIN|[342]|Op:Insert|Type:SurveyQuestionResponsec|Rows:6 21:42:40.0 (95957716)|CODE_UNIT_STARTED|[EXTERNAL]|Flow:01I3A000002o2mC 21:42:40.0 (96232978)|CODE_UNIT_FINISHED|Flow:01I3A000002o2mC 21:42:40.0 (114013822)|DML_END|[342] 21:42:40.0 (114107381)|EXCEPTION_THROWN|[342]|System.DmlException: Insert failed. First exception on row 0; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] 21:42:40.0 (114749825)|SYSTEM_MODE_EXIT|false 21:42:40.128 (128925139)|SYSTEM_MODE_ENTER|true 21:42:40.129 (129120440)|SYSTEM_MODE_ENTER|true 21:42:40.0 (129514379)|SYSTEM_MODE_ENTER|true 21:42:40.0 (129618146)|SYSTEM_MODE_ENTER|true 21:42:40.0 (130834429)|SYSTEM_MODE_ENTER|true 21:42:40.132 (132892975)|SYSTEM_MODE_ENTER|true 21:42:40.133 (133067303)|SYSTEM_MODE_ENTER|true 21:42:40.0 (142252195)|VF_SERIALIZE_VIEWSTATE_BEGIN|0663A000001iY5x 21:42:40.0 (145362063)|VF_SERIALIZE_VIEWSTATE_END 21:42:40.152 (152392897)|CUMULATIVE_LIMIT_USAGE 21:42:40.152 (152392897)|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 DML rows: 7 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
21:42:40.152 (152392897)|CUMULATIVE_LIMIT_USAGE_END
21:42:40.0 (152489099)|CODE_UNIT_FINISHED|VF: /apex/TakeSurvey 21:42:40.0 (153911680)|EXECUTION_FINISHED
--
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/survey-force/issues/51?email_source=notifications&email_token=ABV6HLB3QJ4GOQ6MMLAXUJDRBCGS7A5CNFSM4KJLECLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKVQ6DA#issuecomment-581635852, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV6HLHEGJ2MZIEQXV2C2DDRBCGS7ANCNFSM4KJLECLA .
--
Jaswinder Rattanpal www.rattanpal.com
I was able to give the site guest user profile this permission "survey-force guest" and it seems to resolve submitting back.
Glad to hear it's working. I'll close this issue now. Please continue to log these as we moved forward; with detailed steps and logs. Those are very helpful
On Mon, Feb 3, 2020 at 6:12 PM juarezcolby notifications@github.com wrote:
I was able to give the site guest user profile this permission "survey-force guest" and it seems to resolve submitting back.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SalesforceLabs/survey-force/issues/51?email_source=notifications&email_token=ABV6HLGO7YMH6HZQTRCTTODRBCQEJA5CNFSM4KJLECLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKVX5UI#issuecomment-581664465, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV6HLBU5JPK4U4KWDDBXADRBCQEJANCNFSM4KJLECLA .
I think I am affected by the most recent security updates in salesforce. The users use to be able to fill out a survey and submit the info back and it would say who the contact was that did this. The users are able to submit back the survey but now the contact info is blank. I have double-checked that they have the correct permission set on the site guest user profile. Please point me in the right direction.