Salesforce の Flow において、カスタム項目の API 参照名を変更した後にレコードトリガーフローでエラーが発生する事象と、その解決策について説明します。
この問題は、決定要素などで $Record , $Record__Prior を使用している場合に参照が自動更新されないために発生します。
本記事では、手動での更新手順を案内します。
事象の概要
Salesforce の Flow におけるレコードトリガーフローでは、カスタム項目の API 参照名を変更するとエラーが発生する場合があります。
これは、決定要素や割り当て要素のリソースセクションで $Record や $Record__Prior を使用している際、古い API 参照名が自動更新されないために起こります。
要素や参照方法による API 参照名自動更新の挙動は、以下の表を参考にしてください。
*すべてが記載されているわけではないのでご注意ください。
| 要素・参照方法 | 参照方法自動更新されるか |
| 決定要素 | いいえ |
| 割り当て要素 | いいえ |
| レコードを取得要素 | はい |
| レコードを更新要素 | はい |
| 値セクション (例: {!$Record.newfield__c}) | はい |
| レコードを取得要素経由の参照 (例: {!Get_Account.newfield__c}) | はい |
解決手順
決定要素や割り当て要素で $Record 等を使用している場合、新しい API 参照名へ手動で更新する必要があります。
以下の手順に従って、項目の参照を手動で更新します。
1. 影響を受けているフローを Flow Builder で開く。
2. リソースセクションで、変更前の API 参照名を使用している決定要素や割り当て要素を特定する。
3. 項目の参照を新しい API 参照名に更新する。(例: {!$Record.checkboxtest1__c})フローを保存し、再度有効化する。
補足: 新しいバージョンの作成や、フローの無効化および再有効化だけでは問題は解決しません。参照は必ず手動で修正してください。
005460862

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.