Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] Codeunit 6102 "E-Doc. Export"– OnBeforeMapEDocument #28191

Open
TMEKUMA opened this issue Feb 20, 2025 · 0 comments
Open

[Event Request] Codeunit 6102 "E-Doc. Export"– OnBeforeMapEDocument #28191

TMEKUMA opened this issue Feb 20, 2025 · 0 comments

Comments

@TMEKUMA
Copy link

TMEKUMA commented Feb 20, 2025

Describe the request

Could we please have a publisher OnBeforeMapEDocument in function ExportEDocument Codeunit Codeunit 6102 "E-Doc. Export"?

    internal procedure ExportEDocument(var EDocument: Record "E-Document"; var EDocumentService: Record "E-Document Service") Success: Boolean
    var
        TempEDocMapping: Record "E-Doc. Mapping" temporary;
        EDocLog: Record "E-Document Log";
        EDocumentLog: Codeunit "E-Document Log";
        TempBlob: Codeunit "Temp Blob";
        SourceDocumentHeaderMapped, SourceDocumentLineMapped : RecordRef;
        SourceDocumentHeader, SourceDocumentLines : RecordRef;
        EDocServiceStatus: Enum "E-Document Service Status";
        ErrorCount: Integer;
    begin
        SourceDocumentHeader.Get(EDocument."Document Record ID");
        EDocumentProcessing.GetLines(EDocument, SourceDocumentLines);

// >>>>>>>>
        OnBeforeMapEDocument(EDocument, SourceDocumentHeader, SourceDocumentLines);
// >>>>>>>>

        MapEDocument(SourceDocumentHeader, SourceDocumentLines, EDocumentService, SourceDocumentHeaderMapped, SourceDocumentLineMapped, TempEDocMapping, false);


// >>>>>>>>
    [IntegrationEvent(false, false)]
    local procedure OnBeforeMapEDocument(EDocument: Record "E-Document"; var SourceDocumentHeader: RecordRef; var SourceDocumentLines: RecordRef;)
    begin
    end;
// <<<<<<<< 

Additional context

We have additional line types, similar to Comment such as headings and line totals, which should not be transferred to the XML. These must be filtered out here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant