Customize a Salesforce Object > Create Formula Fields

[Customize a Salesforce Objectに戻る](https://qiita.com/Keiji_otsubo/items/f1bddefc88b737ed52a6)

https://trailhead.salesforce.com/content/learn/projects/customize-a-salesforce-object/create-formula-fields?trailmix_creator_id=strailhead&trailmix_slug=prepare-for-your-salesforce-administrator-credential

+ 何もしないで検証ボタンをクリック

:::note alert
We can't find the formula field 'Commission__c' on the Opportunity object.
:::

+ Commission 数式フィールドを作成

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/5e7130d6-5c2d-e670-c3ae-58f9eed89659.png)

:::note alert
We can't find the expected formula on the Commission field from the Opportunity object.


Opportunity オブジェクトの Commission フィールドに期待される数式が見つかりません。
:::

あれ？数式が違った？

ああ、これやってない

In the Visible column, select Sales User and System Administrator.

Salse Userがないなぁ。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/ba812ccd-f824-876e-d00b-113200a0f324.png)



一番最初のWork with Standard and Custom Fieldsで作ってるな。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/de52448a-46de-7611-6909-0fcb5e40bbab.png)

FLSを修正したけどエラーは変わらないですね。

:::note alert
We can't find the expected formula on the Commission field from the Opportunity object.
:::

以下でも同じエラーですね。

+ [I am getting this message error, "We can't find the expected formula on the Commission field from the Opportunity object." But I have checked all my formulas and name field and fiels label and cannot see anything wrong with it.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007YwBMISA3)
+ [Erron in "Create Formula Fields" "We can't find the expected formula on the Commission field from the Opportunity object."](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007aiCWsSAM)


あああ、同じフィールドの数式を転記してますね。

```
IF( ISPICKVAL( StageName , "Closed Won") , Amount * 0.1, 0)
```
上記に変えたらエラーが変わりました。

:::note alert
We can't find the formula field 'Region_Zone__c' on the Opportunity object.
:::

試しにFLSのSales Userを無効にしたけど、エラーは変わらないということは、FLSは見てない？

システム管理者も外したら、このエラーになりましたね。

:::note alert
We can't find the formula field 'Commission__c' on the Opportunity object.
:::

+ [We can't find the formula field 'Commission__c' on the Opportunity object.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007aiyzw)

:::note
my issue was from the field level security, i unselected sales user and system administrator instead of selecting them.
:::

+ [I need help to complete Trailhead "Customize a Salesforce Object Create Formula Fields"](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007aiyzw)

:::note
やはり、この設定の問題だった
:::

# Region__c  がない

+ [Region__c  がない](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007X6Z8c)

```
TEXT( Account.Region__c ) & "/" & TEXT( Account.Zone__c )
```

:::note
Try adding the field to the account object

https://trailhead.salesforce.com/content/learn/projects/customize-a-salesforce-object/picklists-field-dependencies

Next, create the same field on the Account object following the same steps.

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/0d4bacf6-645d-89e3-6dd6-c6a49036573a.png)
:::