トレイルヘッド　Screen Flows

+ [Screen Flows](https://trailhead.salesforce.com/content/learn/modules/screen-flows) 



# Build a Screen Flow

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

:::note alert
In the ‘Opp Fields’ element, we can’t find a Date component named ‘Estimated_Close_Date’.
:::

有効化してないけど、合格したな。　チェックロジックは不統一だな。


# Give Users a Choice

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

:::note alert
In the ‘Opp Fields’ element, we can’t find a Picklist component named ‘New_or_Existing_Customer’.
:::


ここまでOK
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/e4d27516-b3f0-3aa1-0119-b4a2b35fad27.png)


:::note alert
We can’t find the ‘Confirm product’ choice resource. Make sure its API Name is ‘Confirm_product’.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/2d445911-645f-b067-0215-5d270e746845.png)

+ [Issue with screen component](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000J7vZV)

:::note
I think each label contains an underscore.
Try replacing it with a space

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/54717e36-eeae-c939-6433-760f346c6f34.png)
:::

+ [Give users a choice challenge in "screen flows" module.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007bLFa1)

:::note
I was able to complete the challenge after manually typing the values similar to step 4 in the sample of the challenge (Create a Multiselect Question from a Manually Defined Set of Values). Using the new choice button and selecting the new step as resource was the root cause of the failures.

チャレンジのサンプル (手動で定義された値のセットから複数選択の質問を作成する) のステップ 4 と同様の値を手動で入力した後、チャレンジを完了することができました。新しい選択ボタンを使用し、リソースとして新しいステップを選択したことが、失敗の根本原因でした。
:::

:::note alert
We can’t find the ‘Identify contacts’ choice resource. Make sure its API Name is ‘Identify_contacts’.
:::


----
+ [We can’t find the ‘Identify contacts’ choice resource. Make sure its API Name is ‘Identify_contacts’.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V000077mJjR)



Identify contacts (API name: Identify_contacts)まですすむと

:::note alert
We can’t find the ‘Follow-up call’ choice resource. Make sure its API Name is ‘Follow_up_call’.
:::

変なエラー

:::note alert
Shorten this value to 255 or fewer characters.
:::

エラーが消えなのでラベルの１をいれた


:::note alert
We can’t find the ‘Follow-up call’ choice resource. Make sure its API Name is ‘Follow_up_call’.
:::

ラベルを入力するとエラーは変わった。

:::note alert
We can’t find the ‘Site visit’ choice resource. Make sure its API Name is ‘Site_visit’.
:::

最後の変更をしてない場合

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/669f5c09-7ed3-13d2-037b-fa52a61a6974.png)


:::note alert
In the 'Create Opp' element, we can’t find a field value that sets ‘Type’ to ‘New_or_Existing_Customer’.
:::


# In the ‘Opp Fields’ element, we can’t find a Picklist component named 'New_or_Existing_Customer'.

+ [Give Users a Choice : Error message: In the ‘Opp Fields’ element, we can’t find a Picklist component named ‘New_or_Existing_Customer’.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007OuCmH)

:::note
On the label? Please add
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/3d85e6f8-0547-4274-a0d3-55d0ff911fc7.png)
:::

+ [Screen Flows > Improve the Look and Feel of Your Screens](https://qiita.com/Keiji_otsubo/items/0b915585f17ab15df37d)

+ [Issue with New_or_Existing_Customer on ScreenFlows - Give Users a Choice](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007PypLU)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/5f863833-1271-8b3d-8685-db5ada7f02cd.png)

:::note
Please check this article.

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


# Add More Options to Your Screens

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/f5f38f37-17ae-0cac-06e6-3414b5f08fcf.png)
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/c5b05ea0-1058-5dcc-0c19-836e68991f1e.png)


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

:::note alert
We can’t find a record variable named 'oppVar'.
:::

+ oppVarを作った

:::note alert
In the Opp Fields element, we can’t find the 'Name' field related to the 'oppVar' variable.
:::

レコード フィールド コンポーネントは少し異なります。レコード フィールド コンポーネントの場合、値はコンポーネント自体に保存されるのではなく、コンポーネントに関連付けられたレコード変数に保存されます。たとえば、選択されたケース理由は、画面にケース理由レコード フィールドを追加したときに選択した caseVar レコード変数に保存されます。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/c6408e14-07dd-4516-0d26-4164cff26011.png)

filed のところで、追加するって事？先にテキスト型のコンポーネントを追加したけど違う？

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/a5345db2-eb53-789e-7f96-55a937150ff0.png)

おお、エラーが変わったということは、正しいかも

:::note alert
In the Opp Fields element, we can't find the 'Stage' field related to the 'oppVar' variable.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/1dd89477-5fd4-71dd-2bd7-fafe4625f835.png)


:::note alert
In the Opp Fields element, we can’t find a lookup component named 'screenAccount'.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/e607f17c-93f4-7a91-2592-c38b6bc3f36f.png)

:::note alert
We can’t find a Get Records element named 'Get Contacts'. Make sure its API Name is 'Get_Contacts'.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/3f972829-efac-bc9a-d0ef-6f4965ee17e0.png)


:::note alert
We can’t find a Screen element named 'Set Contact'. Make sure the API Name is 'Set_Contact'.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/6b05c28f-82f1-ceb9-90d5-529884f15aa4.png)


:::note alert
In the Create Opp element, we can’t find a field value that sets 'Name' to 'oppVar > Name'.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/1b824a97-b23e-82f8-91f5-c7f88186581e.png)

合格です

# Improve the Look and Feel of Your Screens

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/86f09f42-eb72-6520-9b4c-926718e15a1b.png)


+ 何もせずに検証ボタンをクリックする

:::note alert
In the Estimated_Close_Date component, we can’t find input validation with 'You can’t backdate an opportunity.' as the error message.

estimate_Close_Date コンポーネントでは、「商談を遡ることはできません」という入力検証が見つかりません。エラーメッセージとして。
:::

さて、何をするんだろう？　あああここに追加する？

+ In the New Bot Opp flow’s Opp Fields screen, add input validation to the Estimated_Close_Date component:

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/c3825624-9326-4928-4201-add3baf7bf07.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/a9478ab3-23e1-a587-ffef-df71d6d7de32.png)


:::note alert
In the Opp Fields element, we can’t find a Display Text component named 'NextStepsWarning'.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/cddbfb0d-1519-ad6c-5094-fdbb95702759.png)

:::note alert
In the NextStepsWarning component, we can’t find visibility set to display the component when all conditions are met.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/f1244a3a-6dee-ca4f-3a56-94882cba939a.png)

:::note alert
In the New Bot Opp flow, we can’t find an active version.
:::

アクティブ化したら、合格。

# 実際の質問から

+ [In the Opp Fields element, we can’t find the 'Name' field related to the 'oppVar' variable.](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX000000oFN9)

:::note
こちらの記事をご確認ください。

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