- "Install Survey Force"
- Assign "Survey Force - Admin" permission set to administrator
- Assign "Survey Force - Guest" permission set to Force.com site guest user (Complete steps on Force.com site configuration below)
- Go to "Survey Force App"
- Open "Getting Started" page
- CLick "Make a Sample Survey"
- Click "View Sample Survey"
You should be able to see survey, add questions, edit CSS, share survey with users and see results. Test this survey by sending it to users. In case of errors, check user permissions to appropriate survey objects. There are 4 Survey objets that you need to check.
Make sure that you check access for Force.com site guest user if you plan to embed this survey in Force.com site.
- Survey
- Survey Question Response
- Survey Taken
- Survey Question
- Create a Force.com Site. Details, including "Creating a Force.com Site"
- You can assign "Survey Force - Guest" permission set to this site's guest user
- You need to activate the site otherwise guest user will not be activated and you cannot assign permission set
- You will get "Your account has been disabled" error
- OR you can manually assign all the permission to Guest user profile or create a new permission set
- Modify your Site's "Public Access Settings"
- Check "Read" access to "Survey" and "Survey Question" object.
- Check "Read" and "Create" access for "Surveys Taken" and "Survey Question Responses"
- Check "Read" and "Create" access for "Surveys Taken" and "Survey Question Responses"
- Add the Visualforce page, "Take Survey" to the list of enabled Visualforce pages.
- Create a Sharing Rule for "Survey" in Setup->Sharing Settings. Allow Read access to "Guest" user where "Publicly Available" (Field:Survey__c.Share_with_Guest_User__c) is True (or any other criteria)
- Without this, Guest user cannot see Survey object becasue of new Guest user restrictions
- See below for details
- Complete "General Surveys" steps.
- Check "Read" access for "Contact" object.
- Check "Read" access for "Case" object.
- Private OWD for Case and Contact ?
- Create a public group and add the survey site user.
- Grant read access to case and contact to this group by creating 2 sharing rules
- Check this thread for further information.
Following notes were posted by "Cynthia Chen" on https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003I2gDEAS&revId=a0S3A00000Jk9SvUAJ&tab=r
-
Error on viewing the report results of the survey: error messages "The report ID and the developer name are not defined. Provide either the report ID or the developer name for the report that contains the chart." and "List has no rows for assignment to SObject"
- It is because the user has no permission to see the report "Survey with Questions and Responses“, share the report folder to the user will solve this error. If want to share this report to all internal users, create a Public Group and add All Internal Users will be OK. (Enable automatic access to records using role hierarchies for public groups by selecting Grant Access Using Hierarchies when creating the group. However, don’t use this option if you’re creating a public group with All Internal Users as members.)(The all internal user group is created only after portals/community are enabled.)
-
If want put image in the survey title and bottom and let the survey taker see the iamges,
- Sites > SurveyForcePublicSite > Public Access Settings > Field-Level Security > look for the survey object > view > give reading permissions to the header: Survey Header
-
"Secure guest user record access": Enabling this will stop Guest user access to Salesforce org data. Enabling this may result in Guest user not having access to Survey Force records. More details are at: https://help.salesforce.com/articleView?id=networks_secure_guest_user_sharing.htm&type=5. Be careful when enabling this feature.
- In future, you will not be able to give view/modify all permissions to Guest users
- For this to work, DML code for Guest user has been moved to a without sharing class (ViewSurveyControllerWithoutSharing.cls)
- Create a sharing rule to allow read access to Survey object (and all child objects that includes Survey Questions)
- This sharing rule is based on a new field added to Survey__c object which will be True by default. To remove access from Guest user, you can change the default check option OR create a Process Builder process or trigger to remove it conditionally based on data
- Do NOT assign Guest user as Owner of Sharing rule (only sharing rule is needed)