EnableAlwaysMoveItems method

Future<void> EnableAlwaysMoveItems(
  1. FolderId destinationFolderId,
  2. bool processSynchronously
)
Sets up a conversation so that any item received within that conversation is always moved to a specific folder. Calling this method results in a call to EWS. The Id of the folder to which conversation items should be moved. Indicates whether the method should return only once enabling this rule and moving existing items in the conversation is completely done. If processSynchronously is false, the method returns immediately.

Implementation

Future<void> EnableAlwaysMoveItems(
  FolderId destinationFolderId,
  bool processSynchronously,
) async {
  // ExchangeService.EnableAlwaysMoveItemsInConversations
  EwsUtilities.ValidateParam(destinationFolderId, "destinationFolderId");
  (await _ApplyConversationAction(
    ConversationActionType.AlwaysMove,
    [Id!],
    processSynchronously,
    null,
    false,
    destinationFolderId,
    ServiceErrorHandling.ReturnErrors,
  ))[0].ThrowIfNecessary();
}