Skip to content

[Bug]: table 5339 "Integration Synch. Job Errors" | Integration Event OnAfterLogSynchError(Rec); #8041

@AxelLeder

Description

@AxelLeder

Describe the issue

Event OnAfterLogSynchError raises with a wrong variable.

procedure LogSynchError(IntegrationSynchJobId: Guid; SourceRecordId: RecordID; DestinationRecordId: RecordID; ErrorMessage: Text)
    var
        IntegrationSynchJobErrors: Record "Integration Synch. Job Errors";
        StackTraceOutStream: OutStream;
    begin
        IntegrationSynchJobErrors.Init();
        IntegrationSynchJobErrors."Integration Synch. Job ID" := IntegrationSynchJobId;
        IntegrationSynchJobErrors."Source Record ID" := SourceRecordId;
        IntegrationSynchJobErrors."Destination Record ID" := DestinationRecordId;
        IntegrationSynchJobErrors."Date/Time" := CurrentDateTime;
        IntegrationSynchJobErrors.Message := CopyStr(ErrorMessage, 1, MaxStrLen(IntegrationSynchJobErrors.Message));
        IntegrationSynchJobErrors."Error Message" := CopyStr(ErrorMessage, 1, MaxStrLen(IntegrationSynchJobErrors."Error Message"));
        IntegrationSynchJobErrors."Exception Detail".CreateOutStream(StackTraceOutStream);
        StackTraceOutStream.Write(GetLastErrorCallstack);
        IntegrationSynchJobErrors.Insert(true);
        OnAfterLogSynchError(Rec);
    end;

Expected behavior

Event OnAfterLogSynchError should raise with IntegrationSynchJobErrors instead of Rec

Steps to reproduce

see code

Additional context

No response

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    IntegrationGitHub request for Integration area

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions