Data and Actions in Flows 

+ [Data and Actions in Flows > Communicate Using the Action Element](https://qiita.com/Keiji_otsubo/items/79c45d348e1671f0e60b)


# Work with Salesforce Records in Flows

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

:::note

「Convert to Customer」という名前の自動起動フローが見つかりません。 API 名として「Convert_to_Customer」を使用してフローを保存したことを確認してください。

We can’t find an Autolaunched Flow named 'Convert to Customer'. Make sure you saved the flow with 'Convert_to_Customer' as the API Name.
:::

+ ひとつめの変数を作成してからフローを保存

:::note alert
We can’t find a formula resource with 'WeekFromToday' as the API Name.
:::

:::note alert
In the 'Create Onboarding Task' element, we can’t find a field value that sets 'WhatId' to 'accountID'.
:::

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/61af5c09-decc-abce-8bb1-0c7e033f9310.png)


# Combine Variables and Data Elements

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/5992a39b-304e-ef4f-b07b-840ede94f35d.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/0cc1af44-aa69-e989-adc9-58def68926c3.png)


:::note alert
We can’t find the 'Check New Lead for Matching Account' flow. Make sure you saved the flow with 'Check_New_Lead_for_Matching_Account' as the API Name.
:::

間違ってNameフィールドを使った時のエラー

```
Look_for_Matching_Account (Get Records) - The $Record.Name field contains a derived value that isn’t supported. In a scheduled or record-triggered flow, $Record doesn’t support some standard fields whose values are derived. Remove the $Record.Name field.
```

ラベル名をAPI名と同じにしてしまった...

:::note alert
We can’t find an Update Records element named 'Update Matching Account'. Make sure the API Name is 'Update_Matching_Account'.
:::


#  Communicate Using the Action Element

+ [Trailhead "Communicate Using the Action Element"](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000R9XX3SAN)

何もしないで検証ボタンを押してみる

:::note alert
We can’t find a public group with 'Lead Routing' (API: Lead_Routing) as the API name. Make sure you complete the prework before attempting this challenge.
:::

これを探してしまった。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/027eb861-8be8-e24e-8bce-d340200e47e7.png)



![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/6ae14cac-0e38-d854-5236-4f9958a71325.png)

メールアラートを作成した時点でもう一度検証ボタンを押してみる
エラーメッセージが変わらないので、この説明のところはチェックしてなさそうだな。

:::note alert
We can’t find a public group with 'Lead Routing' (API: Lead_Routing) as the API name. Make sure you complete the prework before attempting this challenge.
:::


OWnerIdを選ぶときは、下にスクロールして表示されるものを使う。
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/c332be5a-6cb6-cdbc-cfca-37862a0544a2.png)

ここの問題をする場合にはひとつ前で作ったフローが必要みたいです。

Combine Variables and Data Elements

+ Label: Check New Lead for Matching Account
+ API Name: Check_New_Lead_for_Matching_Account

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/2c09e08c-c510-df8c-4ebf-26e26126f60e.png)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/0a423be8-82ef-9eec-ede1-e503fda7ae99.png)

何もしないで検証ボタンをクリック
今回は前回作ったフローがあるので、中身がないというエラーだな

:::note alert
In the Check New Lead for Matching Account flow, we can’t find a text template with the API Name 'ChatterMessage'.
:::

メールアラートを作ったけど、先にフローを上げていたので最初は出てきませんでした...


![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/7205b426-df5c-4a09-8fcf-3bb71f883103.png)

+ [In the Check New Lead for Matching Account flow, we can’t find a text template with the API Name 'ChatterMessage'](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007F5Mpo)

:::note
I started the challenge from scratch and it worked. Obviously I did something wrong before. 
:::


# Work with Salesforce Records in Flows

+ [Convert an Account to a Customer](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Yw7S2)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/f27fd29b-937c-5f9f-e2f8-4af52c6db79e.png)

:::note
Please enter the following

+ Set Field Values:
  + Field: Type
  + Value: Customer - Direct

# 未解決

+ [In Data and Actions in Flows > Communicate Using the Action Element, I couldn't complete the task and I get the following messaage: In the 'ChatterMessage' text template, we can’t find a mention for the account’s owner.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007eqnC3)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/c19f794b-93d0-6fc1-8af8-e5b311403b05.png)