Salesforceのアンケートでのエラー

[Salesforceのアンケートに戻る](https://qiita.com/Keiji_otsubo/items/ce153ec9d338d7af0d81)

# 外部アンケートでの404エラー

+ [External Survey's link throws an Error 404 - not found](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000Fxqlw)

:::note
Apparently my template was causing the issue. I should have used Aura as @Popat Brijesh suggested. 
:::

# このエラー コードの理由を特定できる人はいますか?

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/78eaf33f-5496-633f-dbbb-5b58b20baa91.png)

[Can anyone identify a reason for this error code?](https://trailhead.salesforce.com/en/trailblazer-community/feed/0D54S00000Jdcm4)

 I was able to hop on a call with Salesforce support and identify the issue of the blue login screen. Since the survey link was routing to the login screen we knew that it must be an issue with Sites. Once we looked deeper at the site we realized that the "login" page on the default site was literally just the blue screen, as they don't really use sites so they had never tinkered with this page. 

We were able to change the administration settings under Login and Registration from "Login Discovery Page" to "Default Page" for the login screen option. This allowed me to actually input the credentials as an admin and a test user.

The last piece of the puzzle was adding the correct profiles to the Member section so that they could actually login when they got to that screen.

+ [Problem with Assigned Surveys with November update](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000JfZKE)

```
Sorry to interrupt
This page has an error. You might just need to refresh it. 
[r is undefined] 
Failing descriptor: {markup://ArdiraSurvey:surveyResponder}
```

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4a0743d0-57b2-71d0-6f12-fce39c306d13.png)

:::note
Sorry you are running into this issue. It appears that there was a cached version of the survey that was causing the issue. We have cleared the cache setting and the survey is showing up now without any error.  
:::

+ [Survey Builder: Email Error Message](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000Jfja1)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/95b56b98-50d5-1798-51f2-7173d9d727ef.png)

:::note
I found the problem, the user profile do not have access to the email template used to sen the email.

問題が見つかりました。ユーザー プロファイルには、メールの送信に使用されるメール テンプレートへのアクセス権がありません
:::

+ [Error To access this survey, ask your Salesforce admin for permission](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Yvpc8)

:::note
Please check this article.

https://help.salesforce.com/s/articleView?id=sf.networks_guest_profile_best_practices.htm&type=5
:::



# 未解決

+ [Can't assign the Manage Surveys permission in order to use 300 free responses](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Ora17)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/0455f5a2-19ad-08c8-eeaa-a3cd86849fb2.png)

+ [新しいサンドボックスでアンケートを作成するときにエラーが発生します](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007RHrsb)

:::note alert
Action failed: survey:builderStylePanel$controller$setState [Cannot read properties of undefined (reading 'classList')]

Callback failed: serviceComponent://ui.survey.components.controller.SurveyBuilderController/ACTION$getAppInitParams

Failing descriptor: {survey:builderStylePanel$controller$setState}
:::


# We couldn't find the record you're trying to access. It may have been deleted by another user, or there may have been a system error. Ask your administrator for help.

+ [非管理者招待申請者エラー](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000Jfzdg)

管理者以外が [招待状を送信] ボタンをクリックしたときに、このエラーが発生した人はいますか?
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/60150e2e-293a-935a-fbf9-85ab9e121e81.png)

:::note
Sorry to hear that, but also a little relieved I'm not alone. It turns out my issue was related to the the Contact record I was testing with. Our non-admin user didn't have access to the Contact Record Type associated with the Funding Request. I've been successful in sending the invites when using the correct record type.

Update - I believe I found the issue. This error appears when the record of the Contact that I am inviting is owned by another portal user. Put another way, Contact A is a current portal user. Contact B is not; I want to invite them to join and apply for a funding request. Contact A is the record owner of Contact B. Clicking the Invite Applicant button will throw that error and Contact B will not be added as a user.

それ を聞いて申し訳ありませんが、私だけではないことに少し安心しました. 私の問題は、テストしていた連絡先レコードに関連していたことが判明しました。管理者以外のユーザーには、資金調達リクエストに関連付けられた連絡先レコード タイプへのアクセス権がありませんでした。正しいレコード タイプを使用すると、招待状の送信に成功しました。

更新 - 問題が見つかったと思います。このエラーは、招待しようとしている連絡先のレコードが別のポータル ユーザーによって所有されている場合に表示されます。別の言い方をすれば、連絡先 A は現在のポータル ユーザーです。連絡先 B はありません。私は彼らに参加を呼びかけ、資金調達のリクエストを申請したいと考えています。連絡先 A は連絡先 B のレコード所有者です。[応募者を招待] ボタンをクリックすると、そのエラーがスローされ、連絡先 B はユーザーとして追加されません。
:::

# このドメイン名はすでに使用されています 

+ [Salesforceアンケート　エラーでアンケートコピーができない](https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000Jg1LHSAZ)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/e80ac41b-7c82-aa6f-f6bc-8f857a846594.png)

:::note
日本語で名前をつけると同エラーが出ましたが、英語で名前をつけたところコピーができました。
また、今日試したのでSpring23にバージョンアップされたことも影響があるかもしれません。
:::

# We can't open the survey because this invitation is for someone else.

+ [We can't open the survey because this invitation is for someone else.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8jXT)

:::note
Going to throw a comment in here, after spending the last 3 hours troubleshooting this exact error:   If you receive this precise error message, try taking the link and putting it into an incognito browser (this is assuming you've already checked site guest user access to the needed survey objects).   Turns out that the link for site guest user will FAIL if you're logged into salesforce. 
:::

# We couldn't find the record you're trying to access. It may have been deleted by another user, or there may have been a system error. Ask your administrator for help.

+ [Error while sending a survey via email](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007cmGtISAU)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/c114ff41-ea67-40a7-5d27-8d25394c4655.png)



:::note
https://help.salesforce.com/s/articleView?id=000387906&type=1
:::

# We can't find a survey with the name that you specified.  Confirm the name of the survey then try again

+ [メールに埋め込んだURLでエラー](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A94cXSAR)

```
https://<public survey URL>/<Dev name of community>/survey/runtimeApp.app?invitationId={!SurveyInvitation.Id}&surveyName=<developer name of parent survey>&UUID={!SurveyInvitation.UUID}
```

+ [取引先責任者が取得できないらしい](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000JejIx)