Skip to content

[Event Request] Codeunit 1685 - OnLogMessageAsInteractionOnAfterInsertInteractionLogEntry (_Exclude_Email_Logging Extension) #29318

@Imbapriest

Description

@Imbapriest

Why do you need this change?

In the old implementation of the Codeunit (CU 5064 - E-Mail Logging Dispatcher) we had a similiar event and we use that to add additional informations to the Interaction-Log Entry from the incoming Mail-Subject.

We can also do it on the OnAfterCopyFromSegment(Rec, SegLine); [Table 5065 - procedure CopyFromSegment(SegLine: Record "Segment Line") ] because then it will run to often the procedure is used by other cases.

We want to transfer our old Business Case to the new implementation of Mail-Logging Feature.

Describe the request

What we need is the following change

original Code of Codeunit 1685

            if SegmentLine.FindSet() then 
                repeat
                    NextInteractionLogEntryNo := SequenceNoMgt.GetNextSeqNo(Database::"Interaction Log Entry");
                    InsertInteractionLogEntry(SegmentLine, NextInteractionLogEntryNo);
                    EntryNumbers.Add(NextInteractionLogEntryNo);
                until SegmentLine.Next() = 0;

New Code / required integration Event

             if SegmentLine.FindSet() then
                repeat
                    NextInteractionLogEntryNo := SequenceNoMgt.GetNextSeqNo(Database::"Interaction Log Entry");
                    InsertInteractionLogEntry(SegmentLine, NextInteractionLogEntryNo);
                    OnLogMessageAsInteractionOnAfterInsertInteractionLogEntry(NextInteractionLogEntryNo, SourceEmailLoggingMessage.GetSubject())
                    EntryNumbers.Add(NextInteractionLogEntryNo);
                until SegmentLine.Next() = 0;

EVENT:

    [IntegrationEvent(false, false)]
    local procedure OnLogMessageAsInteractionOnAfterInsertInteractionLogEntry(NextInteractLogEntryNo: Integer; Subject: Text)
    begin
    end;

Internal work item: AB#610620

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions