---
title: "Codeunit 5064 Email Logging Dispatcher"
author: "Jonas Paprotka"
url: https://jonas-paprotka.de/ref/codeunit/5064-email-logging-dispatcher/
type: codeunit
id: 5064
name: "Email Logging Dispatcher"
app: "Base Application"
namespace: Microsoft.CRM.Outlook
versions: "17-24"
build: 24.5.23489.36097
obsolete: "Pending 22.0"
checked: 2026-09-20
subject: "Microsoft Dynamics 365 Business Central"
license: "Content © 2026 Jonas Paprotka. Quote freely with attribution and a link."
---

# Codeunit 5064 Email Logging Dispatcher

Jonas Paprotka, https://jonas-paprotka.de/ref/codeunit/5064-email-logging-dispatcher/

| | |
| --- | --- |
| App | Base Application |
| Namespace | Microsoft.CRM.Outlook |
| Versions | 17-24 |
| Obsolete | Pending 22.0, seen from 22. Feature EmailLoggingUsingGraphApi will be enabled by default in version 22.0 |
| Source file | CRM/Outlook/EmailLoggingDispatcher.Codeunit.al |

## Procedures

| Name | Parameters | Returns | Access | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- | --- |
| CheckSetup | (var Record Marketing Setup) | - | public | 17-24 | - | - |
| RunEMailBatch | (Integer, var DotNet IEmailFolder, var DotNet IEmailFolder) | - | public | 17-24 | - | - |
| GetErrorContext | () | Text | public | 17-24 | - | - |
| SetErrorContext | (Text) | - | public | 17-24 | - | - |
| ItemLinkedFromAttachment | (Text, var Record Attachment) | Boolean | public | 17-24 | - | - |
| AttachmentRecordAlreadyExists | (Text, var Record Attachment) | Boolean | public | 17-24 | - | - |
| UpdateSegLine | (var Record Segment Line, Code[10], Text, DotNet DateTime, DotNet DateTime, Integer) | - | public | 17-24 | - | - |
| InsertInteractionLogEntry | (Record Segment Line, Integer) | Integer | public | 17-24 | - | - |
| IsSalesperson | (Text, var Code[20]) | Boolean | public | 17-24 | - | - |
| IsContact | (Text, var Record Segment Line) | Boolean | public | 17-24 | - | - |
| CheckInteractionTemplateSetup | (var Text) | Boolean | public | 17-24 | - | - |

## Events

| Kind | Name | Parameters | Versions | Obsolete | Reason |
| --- | --- | --- | --- | --- | --- |
| Integration event | OnAfterInsertInteractionLogEntry | () | 17-24 | - | - |
| Integration event | OnBeforeGetInboundOutboundInteraction | (Text, var Record Segment Line) | 17-18 | - | - |
| Integration event | OnBeforeIsMessageToLog | (var Record Segment Line, var Boolean, var Boolean) | 18-24 | - | - |
| Integration event | OnBeforeIsSalesperson | (var Text, var Code[20], var Boolean, var Boolean) | 19-24 | - | - |
| Integration event | OnBeforeIsContact | (var Text, var Record Segment Line, var Boolean, var Boolean) | 19-24 | - | - |
| Integration event | OnBeforeGetInboundOutboundInteraction | (var Text, var Record Segment Line) | 19-24 | - | - |
| Integration event | OnIsMessageToLogOnAfterCalcQueueMessageIsSensitive | (var Boolean) | 19-24 | - | - |
| Integration event | OnIsMessageToLogOnAfterCalcSenderIsEmpty | (var Boolean) | 19-24 | - | - |
| Integration event | OnRunJobOnBeforeRunEMailBatch | (var Text, var Codeunit Exchange Web Services Server, Record Marketing Setup) | 19-24 | - | - |
| Integration event | OnLogMessageAsInteractionOnAfterInsertInteractionLogEntry | (Integer, Text) | 19-24 | - | - |

## Source

Symbols: Microsoft.BaseApplication.symbols.437dbf0e-84ff-417a-965d-ed2bb9650972, https://dynamicssmb2.pkgs.visualstudio.com/DynamicsBCPublicFeeds/_packaging/MSSymbols/nuget/v3/index.json, highest build per major on 2026-09-20.

Jonas Paprotka, 2026-09-20.
