SetRetentionPolicyForItemsInConversation method

Future<void> SetRetentionPolicyForItemsInConversation(
  1. FolderId? contextFolderId,
  2. RetentionType retentionPolicyType,
  3. Uuid? retentionPolicyTagId
)
Sets the retention policy of items in the specified conversation. Calling this method results in a call to EWS. The Id of the folder items must belong to in order for their retention policy to be set. If contextFolderId is null, the retention policy of items across the entire mailbox are set. Retention policy type. Retention policy tag id. Null will clear the policy.

Implementation

Future<void> SetRetentionPolicyForItemsInConversation(
  FolderId? contextFolderId,
  RetentionType retentionPolicyType,
  Uuid? retentionPolicyTagId,
) async {
  // ExchangeService.SetRetentionPolicyForItemsInConversations
  (await _ApplyConversationOneTimeAction(
    ConversationActionType.SetRetentionPolicy,
    [MapEntry(Id!, GlobalLastDeliveryTime)],
    contextFolderId,
    null,
    null,
    null,
    retentionPolicyType,
    retentionPolicyTagId,
    null,
    null,
    ServiceErrorHandling.ReturnErrors,
  ))[0].ThrowIfNecessary();
}