Autolaunched and Scheduled Flows　トレイルヘッド

https://trailhead.salesforce.com/ja/content/learn/modules/autolaunched-scheduled-flows?trail_id=build-flows-with-flow-builder

+ [Build an Autolaunched Flow challenge](https://qiita.com/Keiji_otsubo/items/445e863b97338706805d)

# Build an Autolaunched Flow

有効化が必要みたい

:::note alert
In the Create Child Campaign flow, we can't find the latest version activated.
:::

有効化したら合格。

# Run an Autolaunched Flow from a Custom Button

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

:::note alert
We can’t find a custom button named 'Child Campaign'. Make sure the API Name is 'Child_Campaign'.
:::


:::note alert
「子キャンペーン」カスタム ボタンでは、「campStartDate」パラメータに期待される値が見つかりません。必ず「campStartDate」変数を {!TEXT(Campaign.StartDate)} と等しくしてください。

On the 'Child Campaign' custom button, we can’t find the expected value for the 'campStartDate' parameter. Be sure to make the 'campStartDate' variable equal to {!TEXT(Campaign.StartDate)}.
:::

以下の式を使ったけど違う？ !TEXTを使った

```
/flow/Create_Child_Campaign?campID={!Campaign.Id}&campName={!Campaign.Name}&campOwner={!Campaign.OwnerId}&campStartDate={!TEXT(Campaign.StartDate)}&retURL=/{!Campaign.Id}
```

# On the 'Child Campaign' custom button, we can’t find the URL for the Create Child Campaign flow.

+ [Cannot complete Challenge: Run an Autolaunched Flow from a Custom Button](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000OrvXt)

```
/flow/Create_Child_Campaign?campID={!Campaign.Id}&campName={!Campaign.Name}&campOwner={!Campaign.OwnerId}&campStartDate={!Campaign.StartDate}&retURL=/{!Campaign.Id}
```

+ [Going insane on this trailhead challenge - Run an Autolaunched Flow from a Custom Button](https://trailhead.salesforce.com/trailblazer-community/feed/0D5KX00000J60Vm)

新しいプレイグランドを使った

# Schedule a Flow

:::note alert
In the chatterBody text template, we can’t find a mention for the contact’s owner. (Hint: Mentions use this format: @[{!globalVariable.field_API_Name}].)
:::


# In the chatterBody text template, we can’t find a mention for the contact’s owner. (Hint: Mentions use this format: @[{!globalVariable.field_API_Name}].)

+ [Schedule a Flow Unit error message](https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000JgdgQ)


:::note
![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/d68fe0d4-fbbe-1d24-9458-d0ee50d2d142.png)
https://www.youtube.com/watch?app=desktop&v=f3ys5WhAmog
:::



+ [In an email template, how to define a mention for the contact’s owner?](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Ywg7B)

:::note
You need to add as below.

```
Owner: @[{!$Record.OwnerId}]
```

For the at-mention into the body follow these steps:

+ Add square brackets [ ] around the merge field, like this: [{!$Record.OwnerId}]
+ Add an @ symbol at the beginning and a comma at the end, like this: @[{!Record.OwnerId}],
+ When followed by a value enclosed in square brackets, the @ symbol inserts the value as a mention in the Chatter post

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

Owner: @[{!$Record.OwnerId}]に変更したんだけど...

:::note alert
In the Chatter_Mention_Post element, we can’t find the message set to use the 'chatterBody' text template.
:::

ちゃんと選択できてなかった。ブランクが入ってました。

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/4b89977d-44cf-c737-eca3-00bd76ade920.png)


有効化できてない。

:::note alert
In the Check Contact Fields Daily flow, we can't find the latest version activated.
:::

#  {!campID} がない？

+ [Run an Autolaunched Flow from a Custom Button - {!campID} does not exist](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007eqdgS)

![image.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/328136/e564d7eb-51b7-bec8-fbe6-02d5072acead.png)