Newer Version Available
UserEmailCalendarSync
Represents the user assignments of an Einstein Activity Capture
configuration. This object is available in API version 49.0 and later.
Supported Calls
create(), describeSObjects(), query(), update(), upsert()
Fields
| Field | Details |
|---|---|
| ConfigurationId |
|
| UserId |
|
Usage
Use UserEmailCalendarSync to add and remove users to an Einstein Activity Capture configuration.
This example adds two users to an Einstein Activity Capture
configuration.
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, and with the ID of the Activity Capture configuration you are adding them to
6UserEmailCalendarSync user1 = new UserEmailCalendarSync(ConfigurationId = '0063xxxxxxxxxxx', UserId = '005xxxxxxxxxxxx');
7
8UserEmailCalendarSync user2= new UserEmailCalendarSync(ConfigurationId = '0063xxxxxxxxxxx', UserId = '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);This example removes a user from an Einstein Activity Capture configuration.
To remove a user, call UserEmailCalendarSync(), passing in null for ConfigurationId.
1UserEmailCalendarSync user2Remove= new
2UserEmailCalendarSync(ConfigId = "", UserId ='005xxxxxxxxxxxx');
3Database.SaveResult results =Database.insertImmediate(user2Remove);