SalesforceLabs / survey-force

88 stars 63 forks source link

Survey Taken By Contact not being populated #74

Closed dfranasiak closed 4 years ago

dfranasiak commented 4 years ago

Hello, I have just pushed the latest version from Github and now the Taken By Contact is not being populated. We have FLS access granted for the field, as well as External Public Read/Write sharing for contacts. What am I missing?

Thanks in advance

URL format: https://bppn.secure.force.com/TakeSurvey?id=a153k000006C5GcAAK&cId=0033k00003KZ8o4AAD

Debug logs: 37.0 APEX_CODE,DEBUG;APEX_PROFILING,NONE;CALLOUT,NONE;DB,INFO;NBA,INFO;SYSTEM,NONE;VALIDATION,INFO;VISUALFORCE,INFO;WAVE,INFO;WORKFLOW,NONE 00:04:35.0 (463179)|USER_INFO|[EXTERNAL]|0053k00000BBPWF|forms@bppn.force.com|Greenwich Mean Time|GMTZ 00:04:35.0 (543983)|EXECUTION_STARTED 00:04:35.0 (556892)|CODE_UNIT_STARTED|[EXTERNAL]|0663k0000034vT8|VF: /apex/TakeSurvey 00:04:35.0 (1027364)|VF_DESERIALIZE_VIEWSTATE_BEGIN|0663k0000034vT8 00:04:35.0 (18328026)|VF_DESERIALIZE_VIEWSTATE_END 00:04:35.0 (36400199)|USER_DEBUG|[279]|DEBUG|anonymousAnswer::Anonymous 00:04:35.0 (53656469)|DML_BEGIN|[8]|Op:Insert|Type:SurveyTakerc|Rows:1 00:04:35.0 (61186880)|CODE_UNIT_STARTED|[EXTERNAL]|01q3k000000XL9A|SurveyTaken on SurveyTaker trigger event BeforeInsert|sfdc_trigger/SurveyTaken 00:04:35.0 (63138203)|CODE_UNIT_FINISHED|SurveyTaken on SurveyTaker trigger event BeforeInsert|__sfdc_trigger/SurveyTaken 00:04:35.0 (99239135)|DML_END|[8] 00:04:35.0 (101014501)|DML_BEGIN|[13]|Op:Insert|Type:SurveyQuestionResponse__c|Rows:12 00:04:35.0 (204804737)|DML_END|[13] 00:04:35.0 (232740152)|VF_SERIALIZE_VIEWSTATE_BEGIN|0663k0000034vT8 00:04:35.0 (237013709)|VF_SERIALIZE_VIEWSTATE_END 00:04:35.0 (244131980)|CODE_UNIT_FINISHED|VF: /apex/TakeSurvey 00:04:35.0 (244148627)|EXECUTION_FINISHED

jrattanpal commented 4 years ago

What is the latest version have you installed?

In the log, I see you have "SurveyTaker". But that trigger was removed because it didn't work and changed with functionality that does work.

Please either install latest version from AppExchange. Or get the source code from this GitHub repo and change your code.

Thanks

dfranasiak commented 4 years ago

It's version 2.43 but yesterday I used the Github SF Deploy tool ( https://githubsfdeploy.herokuapp.com/) to push all of your code from the main branch of this repo to our org and that's when this error started happening - after I pushed the code from the repo.

Thanks in advance for your help Dan

On Thu, Jul 23, 2020 at 10:10 AM jrattanpal notifications@github.com wrote:

What is the latest version have you installed?

In the log, I see you have "SurveyTaker". But that trigger was removed because it didn't work and changed with functionality that does work.

Please either install latest version from AppExchange. Or get the source code from this GitHub repo and change your code.

Thanks

— 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/74#issuecomment-663029645, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAYTJR376FPK42TF2SM3Y3R5BAGPANCNFSM4PFGW33Q .

-- Dan Franasiak 716-907-3639 Book 30 min meeting https://calendly.com/djf/30min

jrattanpal commented 4 years ago

I am not sure what the issue maybe. You will need to make sure your code matches what I have at https://github.com/SalesforceLabs/survey-force/tree/master/force-app/main/default.

Deploying that code will not remove any extra code/classes although it will overwrite existing ones.

2 main classes that should match exactly are

Make sure to delete that trigger because it does some logic that maybe wiping out contact value (OLD CODE from History) https://github.com/SalesforceLabs/survey-force/blob/3dc14dcc5c74c8e86e83811aef05fa3a5be7c8a5/force-app/main/default/triggers/SurveyTaken.trigger

dfranasiak commented 4 years ago

Ok - will take a look and see if deleting the trigger you referenced resolves. Below is the output from the deploy tool of everything that was pushed:

classes/GSurveysController_Test.cls classes/SFDCAccessControlException.cls-meta.xml classes/SurveySitesUtil.cls-meta.xml classes/GSurveysController.cls classes/SurveyManagerController.cls-meta.xml classes/GSurveysController_Test.cls-meta.xml classes/SFQuestion_Test.cls-meta.xml classes/ReportFinderUtil.cls classes/Message.cls-meta.xml classes/ViewSurveyControllerWithoutSharing.cls-meta.xml classes/LexInputFieldCompCtrl.cls-meta.xml classes/GettingStartedController.cls-meta.xml classes/ViewSurveyController_Test.cls classes/Message.cls classes/CSUtils.cls-meta.xml classes/ViewSurveyController.cls classes/viewSurveyResultsComponentController.cls classes/SurveyTestingUtil.cls classes/SFQuestion.cls-meta.xml classes/Util.cls-meta.xml classes/SurveyAndQuestionController_Test.cls classes/Message_Test.cls classes/Util.cls classes/SFDCAccessControllerTest.cls classes/Message_Test.cls-meta.xml classes/Utilities.cls classes/SurveyManagerController_Test.cls classes/ViewSurveyController_Test.cls-meta.xml classes/CSUtilsTest.cls classes/SFDCAccessController.cls-meta.xml classes/LexInputFieldCompCtrl.cls classes/GettingStartedController_Test.cls-meta.xml classes/SFQuestion_Test.cls classes/viewSurveyResultsComponentController.cls-meta.xml classes/ViewSurveyControllerWithoutSharing.cls classes/SurveyAndQuestionController.cls-meta.xml classes/SFDCAccessController.cls classes/Utilities_Test.cls classes/GettingStartedController_Test.cls classes/LexInputFieldCompCtrl_Test.cls classes/Utilities_Test.cls-meta.xml classes/SFQuestion.cls classes/viewShareSurveyComponentController.cls-meta.xml classes/viewShareSurveyComponentController.cls classes/SurveyManagerController.cls classes/SurveyManagerController_Test.cls-meta.xml classes/SurveyTestingUtil.cls-meta.xml classes/SurveyAndQuestionController.cls classes/SurveySitesUtil.cls classes/LexInputFieldCompCtrl_Test.cls-meta.xml classes/SurveyAndQuestionController_Test.cls-meta.xml classes/SFDCAccessControllerTest.cls-meta.xml classes/GSurveysController.cls-meta.xml classes/Utilities.cls-meta.xml classes/ViewSurveyController.cls-meta.xml classes/SFDCAccessControlException.cls classes/viewShareSurveyComponentController_Test.cls-meta.xml classes/viewShareSurveyComponentController_Test.cls classes/ReportFinderUtil.cls-meta.xml classes/CSUtilsTest.cls-meta.xml classes/GettingStartedController.cls classes/CSUtils.cls reportTypes/Survey_w_Questions_and_Answers.reportType applications/Survey_Force.app applications/Survey_Force_Lightning.app layouts/SurveyTakerc-SurveyTaker Layout.layout layouts/Survey_Questionc-Survey Question Layout.layout layouts/Surveyc-Survey Layout.layout layouts/SurveyQuestionResponsec-Survey Question Answer Layout.layout package.xml permissionsets/Survey_Force_Admin.permissionset permissionsets/Survey_Force_Guest.permissionset tabs/SurveyTakerc.tab tabs/Getting_Started_With_Survey_Force.tab tabs/Survey_Questionc.tab tabs/Surveyc.tab labels/CustomLabels.labels components/viewSurveyResultsComponent.component-meta.xml components/viewSurveyResultsComponent.component components/viewShareSurveyComponent.component-meta.xml components/viewShareSurveyComponent.component components/LexInputField.component components/uiMessage.component-meta.xml components/LexInputField.component-meta.xml components/uiMessage.component objects/SurveyQuestionResponsec.object objects/Survey_Questionc.object objects/Surveyc.object objects/SurveyTaker__c.object staticresources/SurveyForce_jquery_ui.resource-meta.xml staticresources/SurveyForce_SLDS.resource staticresources/SurveyForce_jquery.resource-meta.xml staticresources/SurveyForce_jquery_ui.resource staticresources/SurveyForce_UserGuide.resource-meta.xml staticresources/SurveyForce.resource staticresources/SurveyForce_SLDS.resource-meta.xml staticresources/SurveyForce_svg4everybody.resource-meta.xml staticresources/SurveyForce_UserGuide.resource staticresources/SurveyForce_svg4everybody.resource staticresources/SurveyForce_jquery.resource staticresources/SurveyForce.resource-meta.xml pages/GSurveys.page pages/Getting_Started_With_Survey_Force.page-meta.xml pages/SurveyManagerPage.page pages/TakeSurvey.page pages/Getting_Started_With_Survey_Force.page pages/SurveyPage.page-meta.xml pages/SurveyPage.page pages/GSurveys.page-meta.xml pages/SurveyManagerPage.page-meta.xml pages/TakeSurvey.page-meta.xml reports/Survey_Force_Reports-meta.xml reports/Survey_Force_Reports/Survey_with_Questions_and_Responses.report

jrattanpal commented 4 years ago

Then trigger is the only reason I can think of without investigating it further.

dfranasiak commented 4 years ago

Yes, deactivating the trigger in a sandbox then deploying to prod seemed to resolve the issue and the surveys are now being related to the contacts as expected. Thanks for your help!

On Thu, Jul 23, 2020 at 10:39 AM jrattanpal notifications@github.com wrote:

Then trigger is the only reason I can think of without investigating it further.

— 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/74#issuecomment-663045307, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQAYTJXZTBTELK6KMJ7SI7DR5BDRRANCNFSM4PFGW33Q .

-- Dan Franasiak 716-907-3639 Book 30 min meeting https://calendly.com/djf/30min

jrattanpal commented 4 years ago

Great to hear!

I'll close this issue. If you come across any new issues then please open a new one.