以前のチャレンジが残っていた場合のエラーメッセージ2

[以前のチャレンジが残っていた場合のエラーメッセージに戻る](https://qiita.com/Keiji_otsubo/items/99f347f5c63932a0978d)


:::note
I think the settings for the previous challenge remain. 
Deactivate any settings that prevent you from creating opportunities

If you can't find the settings, try using New Playground
:::


Winter24 適用後に今までとは違うエラーメッセージが出現しました。内容的には以前のチャレンジの設定が残っているために起きていると思われまます。ただ、これまでは以前のチャレンジで設定したエラーメッセージが返ってきたのですが、ここ最近は別のエラーメッセージを返しているようで、中身を特定できません。

+ [**Opportunity recordsを作ることが出来ないというエラーの整理**](https://qiita.com/Keiji_otsubo/items/6d4f4262a0b82197dc89)

# 商談が作成できない  An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org

+ [An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click "Check Challenge" again. If this continues, contact the Trailhead Help team.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007WffHl)

:::note
First click setup then open object manager. Second click opportunity then open field dependencies. Third edit field dependencies and make sure every lost and won values are included then save it then check your challenge.


If this doesn't work, check this out: https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UrsrzSAB

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UrsrzSAB

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T68W1SAJ
:::


+ [facing this problem need answer](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007US5TzSAL)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/44fbeeef-f9e5-e6e8-6c92-e6131f2947fc.png)

+ [Hi i have completed the step but still encountered with the following error:](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T6VR8SAN)

+ [Customize Salesforce Object Badge](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Uo1sGSAR)


+ [Step not yet complete in Empathetic Fox Playground An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click "Check Challenge" again. If this cont](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Urs4J)

:::note
I rechecked and found the issue for wider reach

The issue was that the validation on "Closed Reason" field, was further dependent on the controlling field "Stage" and there were no LOV included in the stage field. Hence, this error was coming at the time of verification.

Once I included the LOV in the stage field for " Closed Lost ", it worked seamlessly.

再確認したところ、より広い範囲に問題があることがわかりました

問題は、「クローズされた理由」の検証が完了していないことでした。フィールドはさらに、制御フィールド「Stage」に依存していました。また、ステージフィールドには LOV が含まれていませんでした。したがって、このエラーは検証時に発生していました。

ステージ フィールドに LOV を含めたことがあります。 クローズドロスト " はシームレスに機能しました。
:::

+ [2024/04/08: create-validation-rules-1](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007bLCxc)

:::note
deactivate this checkbox and try the step in Trailhead again

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/73c4cc79-cd8e-e3a3-17f9-d31504cfc40e.png)

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UpAE7
:::

+ [An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click "Check Challenge" again. If this continues, contact the Trailhead Help team.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UpAE7)

:::note
Hello, I have resolved my error. #Validation Rule

here are the steps:-

+ First click setup then open object manager.
+ Second click opportunity then open field dependencies.
+ Third edit field dependencies and make sure every lost and won values are included then save it then check your challenge.

I have my answer and resolved everyone's error.

こんにちは。エラーは解決しました。 #検証ルール

手順は次のとおりです:-

+ まず [セットアップ] をクリックしてから、オブジェクト マネージャーを開きます。
+ 次に商談を 2 回クリックして、フィールドの依存関係を開きます。
+ 3 番目にフィールドの依存関係を編集し、負けた値と勝った値がすべて含まれていることを確認して保存し、チャレンジを確認します。

私には自分なりの答えがあり、みんなの間違いは解決されました。
:::

+ [Validation Rules Challenge is not completing !!!!](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T68W1SAJ)

:::note
a validation rule from a previous trailhead is causing this issue. The validation rule you have to deactivate is the one called (or at least that's how I see it in my org) "Account_Number_8_Characters"
:::

+ [I'm getting an error on Create Validation Rules](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Urzu9SAB)

+ [【解決】Step not yet complete in My Trailhead Playground 1 An unexpected error occurred while inserting Opportunity records and we couldn't check your work. Make sure Opportunity records can be inserted in this org, and click "Check Challenge" again.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UrsrzSAB)

PDFの添付

+ [I'm getting an error on Create Validation Rules](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Urzu9)

+ [Create Validation Rules error message](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UsKrr)

:::note
I created a completely new playground and re-did all the work from the module, including all previous steps. This finally worked.
:::

+ [Somebody can help me with the message below:Create Validation Rules](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ViAxL)

:::note
First click setup then open object manager. Second click opportunity then open field dependencies. Third edit field dependencies and make sure every lost and won values are included then save it then check your challenge.

If this doesn't work, check this out: https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UrsrzSAB
:::

+ [I can't finish the Creating Validation Rule challenge... help](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UtVfR)
+ [In customize a Salesforce object the model of a creating a validation rule and getting an error of make sure opportunity records can be inserted in the org](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Uu0lp)
+ [英語いしてもダメ？](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007XIMY8)

:::note
言語設定が英語以外
:::

+ [Is there an error with Validation Rule Module End?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007X9Rwg)

:::note
I have reviewed the issue in your org and it seems you have created a custom field "Discount Percent" as a required field in Opportunity object as a require field which was a part of previous Trailhead challenge requirement. 
:::


# 取引先責任者が作成できない　An unexpected error occurred while inserting contact records and we couldn't check your work. Make sure Contact records can be inserted in this org, and click "Check Challenge" again. If this continues, contact the Trailhead Help team.

+ [dp1 2024](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UttYE)

:::note
I have found the solution. Although quite strange. The fix is to write the query String in a single line (instead of multiple lines like in the example) like this-

```
String queryString = 'SELECT ID FROM Contact WHERE lastName = :lastName AND title = :title LIMIT 1';
```

So my code goes like this

```
String queryString = 'SELECT ID FROM Contact WHERE lastName = :lastName AND title = :title LIMIT 1';

List<Contact> contacts = Database.queryWithBinds(
     queryString,     
     bindVars,     
     AccessLevel.USER_MODE 
);
return contacts?.get(0).Id;
```
:::

+ [PD1 Winter'24 challenge doesn't work](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Uo1oqSAB)

https://trailhead.salesforce.com/content/learn/modules/platform-developer-i-certification-maintenance-winter-24/get-hands-on-with-bind-variables-in-a-soql-query

:::note
worked for me, No need to insert a contact, Instead query it with last name and title .
:::

:::note
I tried in two old and one new orgs, all get this error message. After changed the query string to:

```
String queryStr = 'SELECT ID FROM Contact WHERE lastName = :lastName AND title = :title LIMIT 1';
```
:::

+ [Challenge not yet complete in Creative Panda Playground An unexpected error occurred while inserting contact records and we couldn't check your work. Make sure Contact records can be inserted in this org, and click "Check Challenge" again. If this continu](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007W5zVq)

:::note
Please check this article.

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Uo1oqSAB
:::


+ [Dont know why this is not Working on Developer Mantenience](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UsAk8SAF)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/79c2ba5f-fb5a-7f46-7556-8acc21b26067.png)

:::note
Try launching the developer console and clicking the Validate button.
I think the error is logged in the debug log.
:::



# 取引先が作成できない An unexpected error occurred while inserting Account records and we couldn't check your work. Make sure Account records can be inserted in this org, and click "Check Challenge" again. If this continues, contact the Trailhead Help team.

+ [回答のまとめ](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007ah3R2)


+ [I encountered a an error while completing the Create Validation Rules unit in Customize a Salesforce Object.error:](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UR6CbSAL)

+ [Customize a Salesforce Object - Create Validation Rules](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007UQ4BC)

:::note
 I ended up creating a new playground and going through the steps again. I found that the Customize Record Pages step was different from when I went through it the first time a few weeks ago. This time it had me using Dynamic Forms and the Lightning App Builder. I was able to successfully validate the last lesson and complete the project.

 結局、新しいプレイグラウンドを作成して、もう一度手順を繰り返すことになりました。「レコード ページのカスタマイズ」ステップが、数週間前に初めて実行したときとは異なっていることがわかりました。今回は、Dynamic Forms と Lightning App Builder を使用しました。最後のレッスンを正常に検証し、プロジェクトを完了することができました。
:::

+ [unexpected error occurred while inserting Account records and we couldn't check your work](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007VHRHr)

:::note
I had to disable triggers created in previous exercises which were blocking the creation of new account record.

I did get similar error on Opportunity which I was able to fix based on steps outlined in following question:

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T68W1SAJ
:::

上記で解決

+ [Create Validation Rules](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007bLfeI)

別の原因

+ [Help needed with Create Validation Rules module verify step](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007eovZK)

:::note
I found another validation rule I had created when going through the module.

Lesson for me is: don't save any steps taken when going through the module (that are not part of the Verify Step at the end)!
:::

上記の複合回答

+ [In Customize a Salesforce Object in Create validation rules i have completed all the particular tasks mentioned but I am getting this error and it is showing like this An unexpected error occurred while inserting Account records](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007epjEL)

+ [Unable to complete - Create Validation Rules](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007erINY)

:::note
Please deactivate Account_Number_8_Characters  Validation rules

SETUP > OBJECT MANAGER > Account > Validation rules  Account_Number_8_Characters 
-> deselect " Active"
-> Save
:::

### 未解決

+ [An unexpected error occurred while inserting Account records and we couldn't check your work. Make sure the validation rule error message is correct, and that account records can be inserted in this org, then click "Check Challenge" again.](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000SWdGi)