親レコードの更新時に、フローを利用して親レコードに紐づく複数の子レコードに Chatter 投稿を行う方法について説明します。
フロー種別:レコードトリガーフロー
使用する要素:レコードを取得、ループ、Chatter に投稿
使用するリソース:テキストテンプレート
注意:
・こちらの記載内容についての具体的な手順に関しては、Salesforce サポートでは対応できかねますので、あらかじめご了承ください。
・お客様で構築しても期待通りの動作にならない場合は、Salesforce サポートに問い合わせてください。
シナリオ
取引先の標準項目「種別(Type)」の値が変更されるたびに、紐づくすべての取引先責任者レコードの Chatter フィードに投稿を行います。
ポイント
「Chatter に投稿」アクションの [対象名または ID] で単一値リソースのみを使用できます。
複数のレコード(コレクション変数)に対して Chatter 投稿を行うには「ループ」要素を使用します。
サンプルフローの構築手順
*Chatter に投稿するメッセージの本文の設定例
・投稿先である取引先責任者レコードの所有者ユーザーにメンションする場合:@[{!Loop.Owner.Id}]
・フローをトリガーした取引先レコードの URL を記載する場合:https://ドメイン名.lightning.force.com/lightning/r/Account/{!$Record.Id}/view
・フローをトリガーした取引先が更新されたときに、そのレコードの前の項目値を参照するには、$Record__Prior グローバル変数を使用します。
注意事項:
「Chatter に投稿」アクションでは、テキストベース(文字列のみ)を入力/表示可能な「プレーンテキスト」のみが利用できます。
そのため、前述の通りテキストテンプレートを利用する場合は、まずは「プレーンテキストとして表示」に変更してください。
本文設定例:
ーーーーーーーーーーーーー
@[{!Loop.Owner.Id}]
下記取引先レコードの「種別」が変更されたためお知らせします。
・レコード URL:https://ドメイン名.lightning.force.com/lightning/r/Account/{!$Record.Id}/view
・変更前の「種別」項目値:{!$Record__Prior.Type}
・現在の「種別」項目値:{!$Record.Type}
ーーーーーーーーーーーーー
投稿した場合:
*仮にフローをトリガーした取引先レコード(レコード ID:0015g00001LOD8FAAX)上の「種別」項目値を「インテグレーター」から「報道機関」に変更した場合。
関連情報:
005105055

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.