Newer Version Available

This content describes an older version of this product. View Latest

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()

Special Access Rules

To access this object, enable Einstein Activity Capture in your org.

Fields

Field Details
ConfigurationId
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the Einstein Activity Capture configuration. The configuration is created in Salesforce Setup. After the configuration is created, the autogenerated ID is visible on the Configurations tab. From Setup, in the Quick Find box, enter Einstein Activity Capture, and then select Settings. Click the Configurations tab.
UserId
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
Description
ID of the user. Only Einstein Activity users can be added to a configuration.

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);