この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

ApexEmailNotifications

ApexEmailNotifications 型では、未対応の Apex エラーのメールを受信するユーザとメールアドレスを定義できます。フローエラーにこのメタデータ型を使用することもできます。

宣言的なメタデータファイルのサフィックスおよびディレクトリの場所

コンポーネントのファイル名は apexEmailNotifications.notifications です。Apex メール通知ファイルは、対応するパッケージディレクトリの apexEmailNotifications フォルダに保存されます。

バージョン

ApexEmailNotifications コンポーネントは API バージョン 49.0 以降で使用できます。

項目

項目名 項目の型 説明
apexEmailNotification ApexEmailNotification 特定の Apex メール通知。複数の通知を指定できます。

ApexEmailNotification

Apex メール通知を表します。

ApexEmailNotification ごとに、メールまたはユーザを含めることができますが、両方を含めることはできません。

メモ

項目名 項目の型 説明
email string 通知の送信先となる外部メールアドレス。user 項目との併用はできません。
user string 通知先の Salesforce ユーザのユーザ名。email 項目との併用はできません。

使用方法

ApexEmailNotifications をリリースすると、組織内の以前の通知がすべて削除されます。例として、組織でリリースされている 2 つの通知 test1@example.com と test2@example.com について考えます。次の apexEmailNotifications.notification をリリースすると、test1@example.com はリリース済みリストにないため、削除されます。
1<?xml version="1.0" encoding="UTF-8"?>
2<ApexEmailNotifications xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apexEmailNotification>
4        <email>test2@example.com</email>
5    </apexEmailNotification>
6</ApexEmailNotifications>

destructiveChanges.xml では、ApexEmailNotifications メタデータ型はサポートされていません。特定の ApexEmailNotifications の項目を削除するには、削除する項目を除いて、新しい ApexEmailNotification をリリースします。組織のすべての Apex メール通知を削除するには、ApexEmailNotifications の空のリストをリリースします。

メモ

宣言的なメタデータの定義のサンプル

Apex メール通知をリリースするには、正確なファイル名を指定するか、package.xml でワイルドカードを使用します。

次の例では、package.xml で正確なファイル名を指定しています。
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>apexEmailNotifications</members>
5        <name>ApexEmailNotifications</name>
6    </types>
7    <version>49.0</version>
8</Package>
次の例では、package.xml でワイルドカードを使用しています。
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>ApexEmailNotifications</name>
6    </types>
7    <version>49.0</version>
8</Package>
次のサンプルは、組織の Salesforce ユーザに通知する Apex メール通知をリリースします。
1<?xml version="1.0" encoding="UTF-8"?>
2<ApexEmailNotifications xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apexEmailNotification>
4        <user>user1@example.com</user>
5    </apexEmailNotification>
6</ApexEmailNotifications>
次のサンプルは、外部メールアドレスに通知する Apex メール通知をリリースします。
1<?xml version="1.0" encoding="UTF-8"?>
2<ApexEmailNotifications xmlns="http://soap.sforce.com/2006/04/metadata">
3    <apexEmailNotification>
4        <email>test@example.com</email>
5    </apexEmailNotification>
6</ApexEmailNotifications>

マニフェストファイル内のワイルドカードのサポート

このメタデータ型では、package.xml マニフェストファイル内のワイルドカード文字 * (アスタリスク) がサポートされます。マニフェストファイルの使用についての詳細は、「zip ファイルを使用したメタデータのリリースと取得」を参照してください。