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

UserEmailCalendarSync

Einstein 活動キャプチャのユーザー割り当てを表します。このオブジェクトは、API バージョン 49.0 以降で使用できます。

サポートされているコール

create()describeSObjects()query()update()upsert()

特別なアクセスルール

このオブジェクトにアクセスするには、組織で Einstein 活動キャプチャを有効にします。

項目

項目 詳細
AssignedId
string
プロパティ
Create、Filter、Group、Nillable、Sort、Update
説明
ユーザーまたはプロファイルの ID。設定に追加できるのは、Einstein 活動ユーザーのみです。
ConfigurationId
string
プロパティ
Create、Filter、Group、Nillable、Sort、Update
説明
Einstein 活動キャプチャ設定の ID。設定は Salesforce の [設定] で作��します。設定を作成すると、自動生成された ID が [設定] タブに表示されます。[設定] から、[クイック検索] ボックスに「Einstein 活動キャプチャ」と入力し、[設定] を選択します。[設定] タブをクリックします。

使用方法

UserEmailCalendarSync を使用すれば、ユーザーを Einstein 活動キャプチャ設定に追加または削除できます。ユーザーを設定に追加するには、ユーザー ID またはプロファイル ID を使用します。1 つのプロファイルは 1 つの設定にのみ追加できます。また、1 つのプロファイルは 1 人のユーザーにのみ割り当てることができます。

次の例では、2 人のユーザーを Einstein 活動キャプチャ設定に追加します。
1// Create a list of UserEmailCalendarSync records
2List<UserEmailCalendarSync> usersToAdd = new ArrayList<>();
3
4// Populate the UserEmailCalendarSync record with the ID of
5// the user or profile, and with the ID of the Activity Capture configuration you are adding them to
6UserEmailCalendarSync user1 = new UserEmailCalendarSync(ConfigurationId = '0063xxxxxxxxxxx', AssignedId = '005xxxxxxxxxxxx');
7
8UserEmailCalendarSync user2= new UserEmailCalendarSync(ConfigurationId = '0063xxxxxxxxxxx', AssignedId = '005xxxxxxxxxxxx');
1// add the UserEmailCalendarSync users to your list 
2usersToAdd.add(user1);
3usersToAdd.add(user2);
1// Insert the list of UserEmailCalendarSync into the database
2Database.SaveResult[] results = Database.insertImmediate(usersToAdd);

次の例では、1 人のユーザーを Einstein 活動キャプチャ設定から削除します。

ユーザーを削除するには、UserEmailCalendarSync() をコールし、ConfigurationIdnull を渡します。

1UserEmailCalendarSync user2Remove= new
2UserEmailCalendarSync(ConfigurationId = "", AssignedId ='005xxxxxxxxxxxx');
3Database.SaveResult results =Database.insertImmediate(user2Remove);