Apex トリガーがプラットフォームイベントのサブスクライバーとして構成されている場合、この Apex トリガーは、原因ユーザー (プラットフォームイベントを作成したユーザー) ではなく「自動プロセス」として実行されます。
メールや別のシステムへのコールなど、どこかで何らかの通知を必要とするアクションが発生するたびにこれを記録する目的で、通知プラットフォームイベントが作成されました。この通知イベントは、イベントの理由、メッセージ、通知タイプ、オブジェクト ID、レコード名を記録します。たとえば、特別な注文があった場合、このイベントのトリガハンドラは、通知タイプがこの特別な注文のためのものであるかを確認します。
そうであった場合、この注文のオブジェクト参照を持つカスタムオブジェクトのワークフロールールが起動し、テンプレートを使用してメールが送信されます。
REST API 経由ではこのメールは正しく送信されず、デバッグログにエラーが生成されます。
回避策として、Apex トリガーをプロセスビルダーに置き換えます。
プロセスイベントサブスクライバーを使用します。プロセスサブスクライバーは、適切な原因ユーザーとして実行されます。
000383103

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.