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
rameshramesh 

facing problem in survey

hai,
i am creating survey invitaion throug to mail i am getting error

This page has an error. You might just need to refresh it. Error in $A.getCallback() [Cannot read properties of null (reading '0')] Callback failed: serviceComponent://ui.survey.components.controller.SurveyEmailController/ACTION$loadTemplate Failing descriptor: {survey:surveyEmailWizard}

but if i use admin profile its working fine but i used marketing usr profile i am getting error
SwethaSwetha (Salesforce Developers) 
HI Saki,
What is the email template being used for sending survey?

What does the SOQL return
select id from EmailTemplate where Name='Embed_a_Survey_Link' and RelatedEntityType = 'SurveyQuestion' 

Thanks
rameshramesh
hai swetha i ran same soql I attached image please checkUser-added image 
SwethaSwetha (Salesforce Developers) 
HI Saki,
I can see that Embed_a_Survey_Link email template is existing in your org based on the SOQL. This error is also thrown when Embed_a_Survey_Link is missing from the orgs based on my past experience.

As a next step, check if the marketing user profile have access to the Survey Response object? 

Also, based on https://help.salesforce.com/s/articleView?id=sf.task_enable_surveys.htm&type=5  "To create surveys that are available to Experience Cloud site users and external unauthenticated users, select an Experience Cloud site."

In case of guest user profiles, I recommend that you follow the steps in the documentation below to set up an Experience Cloud site and then set up the Guest User Profile so they can access the link.

Set up an Experience Cloud site https://help.salesforce.com/s/articleView?id=sf.networks_setup_maintain_communities.htm&type=5

Enable "Create" permission for guest profile on Survey Response object https://help.salesforce.com/s/articleView?id=000380930&type=1
  
If this information helps, please mark the answer as best. Thank you
Siri Deva Singh KhalsaSiri Deva Singh Khalsa
@swetha - I am receiving the same error as Saki. When I run the SOQL query, it appears I do not have the Embed_a_Suvey_Link email template.

How do I create one?
Joseph MaryJoseph Mary

Are You Looking To take the DG customer survey? Follow these simple steps to win a money coupon From Dollar General Store.

1. Firstly, purchase at a Dollar General store to receive a receipt with a survey invitation.
2. Visit the official Dollar General survey website - dgcustomerfirst (https://www.dgcustomerfirstgiftcards.com/).
3. Enter the store number, time, and date found on the receipt.
4. Answer the survey questions honestly and thoroughly.
5. By completion, you may be entered into a sweepstakes to win a $100 General gift card.