Skip to content

[Bug]: Codeunit 1685 "Email Logging Invoke" Event OnBeforeGetInboundOutboundInteraction #29681

@KnuturB

Description

@KnuturB

Describe the issue

The event is unavailable, due to the protection level of Codeunit 1687 "Email Logging Message" :

'Codeunit Microsoft.CRM.EmailLoggin."Email Logging Message"' is inaccessible due to its protection level

This for example will not compile.

codeunit 59000 "EmailLoggingSubscribers"
{
[EventSubscriber(ObjectType::Codeunit, Codeunit::"Email Logging Invoke", 'OnBeforeGetInboundOutboundInteraction', '', false, false)]
local procedure OnBeforeGetInboundOutboundInteraction(var EmailLoggingMessage: Codeunit "Email Logging Message"; var SegmentLine: Record "Segment Line")
begin
end;
}

I have searched and could not find a duplicate issue on this.

Expected behavior

The above example should compile.

Steps to reproduce

Create a new empty codeunit, paste the example, compile.

Additional context

Not sure about how to best go about fixing this.

One solution could be, to not have Acces = Internal in codeunit 1687.

Or if you want to maintain the protection level, to create some sort of a "shim" to sit in between.

I will provide a fix for a bug

  • I will provide a fix for a bug

Internal work item: AB#630222

Metadata

Metadata

Assignees

No one assigned

    Labels

    IntegrationGitHub request for Integration areaacceptedAccepted as backlog work item.

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions