function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Survey Force Question

I'm currently testing out Survey Force from Labs

've manage to install, deploy and create my first survey, however when I select 'Email link with Contact & Case merge' it is not finding any sites to expose to. The only option I have is internal despite the fact I have a site enabled with the required vforce pages.

I am doing this in a sandbox, would this cause this to happen?

If anyone can advise, I would be very grateful!




Hmm.  I just did a refactor on this, and it was reading Sites fine in Production.  But normally I would expect that to work in Sandbox, too.  Do you have the active flag checked on the site?


The site is active. I've managed to access the external survey page by appending the site URL with the necessary parameters and it works fine. I assume thats all I will benefit from receiving if I manage to select the site from the dropdown?




Yes, you are correct.

Let me know what you thiink of the UI -- always like feedback.


UI is great, and very easy to use. The one area that I would like more explanation for is the styling option (CSS).


Other than that, I think this is a slick easy tool to gather customer feedback/opinion - Great work!

Sue ChucholowskiSue Chucholowski

Hi ReidC,

I installed survey force yesterday and came across the same issue.

Since my site is active I also was able to build the URL myself and it works, BUT it doesn't capture the results. I am using it with cases and contacts. When I click submit I get the following:  error: Authorization Required You must first log in or register before accessing this page. If you have forgotten your password, click Forgot Password to reset it.

Any ideas?

Thanks, Sue


Hi Sue,


I had to add read access to Accounts in addition to contacts and cases in site access to resolve the permission issue. Give that a go and see if you still get the same problem.


Sue ChucholowskiSue Chucholowski

Hi Graeme,

many thanks for that tip.

I added account read acces in the public access settings but unfortunately still get the same error when clicking "submit" on my survey.


Authorization Required 


You must first log in or register before accessing this page. 

If you have forgotten your password, click Forgot Password to reset it.


One thing to note is that the apex "AddUsersController" wasn't included in the package that I installed from appexchange yesterday and therefore couldn't be added for apex class access. I already reported this here: Maybe this causes the problem?




I did notice that was missing. I haven't added that controller but my results are still inserting without an issue.


Can you submit a survey with blank Contact & Case IDs?





There's an updated package that's live today.  The other package wasn't building a list of the sites.  It still worked, but it was non-obvious and pretty inconvenient.  Sorry.  As long as you add the TakeSurvey page to the list of enabled VF pages for the Public profile, you're good.  Here's a super easy set of install instructions.


PS -- I removed the need for the "AddUsersController".  Its no longer included in the package and no longer required.  Also the brief installation instructions no longer include it.

Sue ChucholowskiSue Chucholowski

Hi Reid,


thanks for the update.

I installed the new version again and followed your post-install instructions here


I first tested the anonymous survey link (external), it worked and the results are captured.


BUT it still doesn't work for using it with case and contact id, I still get the following error page after submitting the survey upon case closure. Same if I test it with contact only.


Authorization Required 


You must first log in or register before accessing this page. 

If you have forgotten your password, click Forgot Password to reset it. 


I enabled read access for accounts, contacts and cases as well as the required permission for the survey objects.

Why does it not work yet?

I am working in a cs2 sandbox, but this shouldn't be a problem?


Thanks and Regards, Sue

Sue ChucholowskiSue Chucholowski

Hi Graeme,


it only works at the moment if I use the anonymous link.


If I use the link with &cId={!Contact.Id}&caId={!} but there is no contact and case referenced, I get the same error as when I test it with contact and case ID:

Authorization Required 

You must first log in or register before accessing this page. 

If you have forgotten your password, click Forgot Password to reset it.


Regards, Sue

Sue ChucholowskiSue Chucholowski

Hi Reid, Graeme,


I got it to work!


The problem were the security settings for contacts and cases. Both are private.

So I created a public group for the survey site user and added 2 sharing rules to give case and contact read-only access.


Now I have one final issue: the survey results arrive with "taken = false" - why that? shouldn't it be true?

That happens for the anonymous results as well as the result from contact/case.


Thanks again for your help here!

Regards, Sue


Hi Sue -- that field looks vestigal to me.  Pretty sure we can ignore it.



I am having the same problem - Anonymous works fine, however with a contact I get authorisation error.

I have given Read access to Contacts etc, as well as create public group with Read access, and still I am getting authorisation error.

Have been at this for the last 4 hours going over it over and over with no luck - any suggestions?




Hi SFB, 


Sue's answer above should help you out. If your sharing setting defaults for contacts and cases are set to private (Setup->Administration Setup->Seurity Controlsa->Sharing Settings) then you will need to set up a sharing rule to allow site guests to read them.


To do this I created a Public Group  (Setup->Administration Setup->Manage Users->Public Groups) to include the user: Sitename Site Guest User and then used that group when setting up the sharing rule.


Hope that helps



My bad.  I discovered this morning that the error came from the fact that I did not remove the brackets.


I was using:{003d0000009i1tp}&caId=none


With the brackets removed - ie


works perfectly!  My fault for trying these things after 11pm at night.


Thanks very much to everyone for tips and for a great app.

Big Chewy PretzelBig Chewy Pretzel

hi all


Thanks for all the hard work to find some of these issues. It sure made my life easier today. I believe I uncovered one additional issue. The test contact did not have a related Account and, despite essentially opening up all possible security settings, I was unable to get the survey to submit. However, once I attached the Contact to an Account, it submitted just fine. We tend to have a number of Contacts without Accounts for a variety of reasons. Any suggestion on how we can resolve this issue?







Not good idea to have floating orphaned contacts, not sure what your business reason is to have unallocated contacts, but in most cases its best to have them associated to an Account - even if its a bogus one called 'Clients' or 'Staff'.




I wanted to know if the Survey Force can work also with Leads (not just with contacts) and what is needed to customize for that.





Sue ChucholowskiSue Chucholowski

Hi Reid,

I wanted to get back on your comment "Hi Sue -- that field looks vestigal to me.  Pretty sure we can ignore it." for the field "Taken" in the survey result which is set to false as default.


This is an important field. How else could I e.g. report on this or build rules based on a taken survey. When there is a survey result that field should be "True" and not false by default.


Anything we can do about this?


Thanks and Regards,



Chip LittleChip Little

Hi All,


First, I'd like to thank all of you for the awesome replies on this topic.  I've found them very useful.


I'm a novice Salesforce admin (at best) and have been asked by my management to implement a survey for Opportunities.  Unfortunately, I have no Apex coding experience, so much of this code is very foreign to me.  I do have experience coding in other languages, so I'm at least familiar with coding in general.


I've already installed SurveyForce, setup an external Site and Page and created the Sharing Rules for Contacts and Opportunities (as well as Accounts and Cases) with the Survey User in a Public Group.


I'm able to take the survey anonymously without it prompting for a Salesforce login (finally figured out how to append the TakeSurvey page URL to the Site URL), but when I try to enter either a Contact Id or a Case Id in the URL, I also get the "Authorization Required" page.

To complicate things even further, I also need to somehow figure out how to relate these surveys back to an Opportunity, not to a Case.


I do have some Salesforce support internally (very limited), and I know that I can also reach out to our Success Rep (or whatever Salesforce calls them), but I figured I would start here since all of you already have experience with SurveyForce.


Any feedback is appreciated.


Thank you,


- Chip Little


Hi there,


I have created a number of surveys in different languages - however, I do not know how to translate the word "required" at the end of each question. This currently still appears in English.


I have created custom labels for the submit button etc - can someone advise how I can translate "required"? Is that a custom label also? If so - which one?


Many thanks.



Did anyone successfully resolve the issue with the "Taken" field? It shows up as 'false' even though the survey was submitted and it should actually show up as 'true'.





Hi Reid,


I followed the instructions, created a site, attached the VF page, added sharing rules on contacts and cases, however, when a contact submits a survey it does not get recorded in Salesforce, any insight is appreciated.




I would like to know if anybody here has experienced the following problem in Survey Force:


My survey has a header and I am able to see the header information and logo in the survey preview. But once I send out this survey, my customers are NOT able to see the header information and Logo.


I also have another question. My survey's link is associated with the Account and Case number. Is there any way I can prevent a survey for the same Account + Case number combination to be filled out more than once?


Thank you very much.,

Hello everyone!

So, I have SurveyForce installed, and in the installed packages I Have:


Action   Package Name Publisher Version Number Namespace Prefix Status Allowed Licenses Used Licenses Expiration Date Install Date

Uninstall   Survey Force 2.9   N/A N/A N/A N/A 10/30/2013 9:58 AM


Anyway. I can't seem to find a way to actually make a Survey, place any links - I am a bit at a loss (and stuper!), here. 

Can anyone offer some guidance on what I do from here?




Hi Sue,


I am having the same issue you were having with the "Authorization Required" message. I created a public group and two sharing rules for cases and accounts. I am still having the problem and I am not sure if I set up the sharing rules correctly. Could you please provide more detail about the settings that you use for the sharing rules?.


Thanks in advance.

Simply want to use SurveyForce to assimilate real-time feedback during a Sales meeting, so we only want to use internally.  What permissions are necessary so that our users can access the Chatter URL?   I've enabled access to the Survey Questions and Survey objects for certain profiles, but they still don't seem to be able to access the link.   Thank you!

I have installed Survey Force in one of our sandboxes. When I create a new Survey, the Emailable link comesup as

I have uninstalled and reinstalled the app many times. can some one help out for what reason is the URL getting "null" value.
Marc D BehrMarc D Behr
It appears that Communities cause an error with SurveyForce. The fix is one line of code as shown below:
--- a/classes/SurveySitesUtil.cls
+++ b/classes/SurveySitesUtil.cls
@@ -14,7 +14,7 @@ public with sharing class SurveySitesUtil {
 			return ret;
-		List<Sobject> sitesResults = Database.query('Select Name, Subdomain, UrlPathPrefix from Site Where Status = \'Active\'');
+		List<Sobject> sitesResults = Database.query('Select Name, Subdomain, UrlPathPrefix from Site Where Subdomain != null AND Status = \'Active\'');
 		for (Sobject current : sitesResults) {
 			ret.add(new SurveySiteInfo((String)current.get('Name'), (String)current.get('UrlPathPrefix'), (String)current.get('Subdomain')));

Adding the check for non-null subdomains fixes the emailable link issues.

I have submitted a pull request for my code change
Amgad SobiehAmgad Sobieh
where to add this code ?
Marc D BehrMarc D Behr
The code is a patch to the SurveySitesUtil.cls class that is part of the Survey Force package

You need to change the line (arond line 17) in that class that reads:
List<Sobject> sitesResults = Database.query('Select Name, Subdomain, UrlPathPrefix from Site Where Status = \'Active\'');

to be 
List<Sobject> sitesResults = Database.query('Select Name, Subdomain, UrlPathPrefix from Site Where Subdomain != null AND Status = \'Active\'');

The Step 20:
Move “AddUsersController”, “ViewSurveyController” and “SurveyAndQuestionController” into the “Enabled Apex Classes” section. Then, select “Save”

The controller AddUserController is not Avaiable Apex Classes

What do I do now?
Ashok RathvaAshok Rathva
Hi ReidC and Marc.

  There is a limitation of submit survey for 100 questions, It will fire SOQL limitation (Governar limit) Error so can you please provide possible solution to resolve this issue.?

11:26:04.88 (549466305)|SOQL_EXECUTE_BEGIN|[10]|Aggregations:0|SELECT Survey_Question__c FROM Survey_Answer__c WHERE Id = :tmpVar1
11:26:04.88 (552106157)|SOQL_EXECUTE_END|[10]|Rows:1
11:26:04.88 (552913417)|SOQL_EXECUTE_BEGIN|[12]|Aggregations:0|SELECT Survey__c FROM Survey_Question__c WHERE Id = :tmpVar1
11:26:04.88 (555184676)|SOQL_EXECUTE_END|[12]|Rows:1
11:26:04.88 (555791004)|SOQL_EXECUTE_BEGIN|[14]|Aggregations:0|SELECT Id FROM JunctionSurveyEstimate__c WHERE Survey__c = :tmpVar1
11:26:04.88 (558296447)|SOQL_EXECUTE_END|[14]|Rows:0
11:26:04.88 (558857352)|SOQL_EXECUTE_BEGIN|[27]|Aggregations:0|SELECT Id FROM JunctionSurveyData__c WHERE Survey__c = :tmpVar1
11:26:04.88 (561435874)|SOQL_EXECUTE_END|[27]|Rows:0
11:26:04.88 (562103303)|SOQL_EXECUTE_BEGIN|[10]|Aggregations:0|SELECT Survey_Question__c FROM Survey_Answer__c WHERE Id = :tmpVar1
11:26:04.562 (562618093)|CUMULATIVE_LIMIT_USAGE

11:26:04.562 (562618093)|LIMIT_USAGE_FOR_NS
  Number of SOQL queries: 101 out of 100 ******* CLOSE TO LIMIT
  Number of query rows: 50 out of 50000
  Number of SOSL queries: 0 out of 20
  Number of DML statements: 2 out of 150
  Number of DML rows: 29 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
Marc D BehrMarc D Behr
Hi Ashok,

This package is no longer being maintained by anybody as far as I can tell and has a number of issues with it. I would recommend that you not use it and find some other tool for creating surveys. It seems to be you get what you pay for.

Jenni at JackJenni at Jack

“AddUsersController” is no longer part of this package. You can ignore that line in the instructions.
Hi Sue;

I created the group and the 2 sharing rules but is still does not work.  In order to greate the group for the guest site user I needed to enable Guest API Access Enabled in order to find the user for the group. (Done following
Then I created a sharing rule for the Contac object and one for the Case object.
My contact rule is Contact: owned by members of Group: All (group that alllow access to ALL)  and Share with Group: Survey group. I also tried the opposite.
My Case rule is Case: owned by members of Group: All Share with Group: Survey group

Could you please let me know if those were the sharing rules?
Any other help to make it work keeping Case and Conctact Object sharing as "Private" 

Piotr SzlazakPiotr Szlazak
IMHO - the problem with taken=false is related to ViewSurveyController APEX class.
In line 386 value for this field is set:
st.Taken__c = 'false';

Steven Cox 13Steven Cox 13
I saw this question but it hasn't been answered in this thread. I need to somehow figure out how to relate these surveys back to a contact automatically if possible. I'm able to take the survey and view it afterwards. The option is there for me to lookup the contact to relate the survey to that person but manually. Is there not a way to have this done automatically? Perhaps by having the contact log in? I haven't found a lot about this part of Survey Force.
ERP User 5ERP User 5
Hi Piotr - did this issue get resolved/fixed? Why is the value of Taken = false when the survey has been taken?
Alexandra KesmanAlexandra Kesman
Hello from 2018! We're looking at surveys and I'd love to implement this functionality. Can anyone tell me if this is still being supported in any way? I am not sure if I should go through all the implementation if the functionality has waned and doesn't work anymore? 
Viktor SundinViktor Sundin

I have trouble getting the dropdown list in the Survey page to display the Site i created. I only have internal. Has anyone else had this issue?

User-added image

I have checked the following:
* The guest profile for the site has: Modify and Create for Surveys, Survey Questions, Survey Question Responses and Survey Taken
* I have verified that i can access the URL so there is no Authentication problem
* The "TakeSurvey", "Survey page" , "SurveyManagerPage", "GSurvey" and "Getting_Started_With_Survey_Force" is added under Site Visual Force Pages on the Site.
Andy Shelton 24Andy Shelton 24
Question for the group: I created a report to show the cases and the survey responses. I'm trying to figure out how to calculate the percentage of responses marked as "Very Satisfied" for each question on the survey. For example, If 10 people responded, and 7 of 10 marked "Very Satisfied", 1 marked "Satisfied" and 1 marked "Dissatisfied" for question #1, I would like to show a pie chart that displays this result for question #1 and a separate chart for question #2. I tried creating a power of 1 formula for each question that counts the number of different responses: IF(BEGINS( ResponseinTextArea__c, "Very Satisfied"), 1, 0). I then used that field in a summary formula on the report. The problem is that it is calculating the overall percentage of "Very Satisfied" responses for all the records on the report instead of just showing the percentage for question #1. This is a problem because one of the questions is a Yes/No answer so this skews the percentage. For example, if there are 10 perfect survey results on the report (perfect = 9 "Very Satisfied" and 1 "Yes") I want to show that 100% of respondants are "Very Satisfied". Instead, it is showing 90% because one of the responses is "Yes" instead of "Very Satisfied". Any ideas?
caroline Loomiscaroline Loomis
Check Latest Surveys And Win 5000$ Per Week on Surveyguide (