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