SalesforceLabs / survey-force

88 stars 63 forks source link

Error:You have already taken this survey #50

Closed friscoandy closed 4 years ago

friscoandy commented 4 years ago

We have noticed a strange issue that is only affecting some users. When they submit the survey, they see an error message saying that they have already taken the survey. It is not possible that they have already taken the survey because it is a brand new survey. I get this error when I test but another admin on my team does not get the error and is able to submit. Have you seen this before? error

jrattanpal commented 4 years ago

Code for this is at https://github.com/SalesforceLabs/survey-force/blob/master/src/classes/ViewSurveyController.cls

In function private Boolean AddSurveyTaker()

From line#377 - 388

This code has always been there but I recently fixed it. That's why you are facing this. This will only work for internal users but not anonymous users (as they all share same Guest User ID so we can't do it there).

You can remove that code if you want or change the criteria to match your needs

friscoandy commented 4 years ago

We will give this a try. You are the best!