Skip to content

[Event Request] [W1][Report][7000097][Reject Docs.] OnPostDataItem "dataitem CustLedgEntry" #29596

@jcarrascolbt

Description

@jcarrascolbt

Why do you need this change?

We want to modify the report "Reject Docs." so that it doesn't show the message for the registration of each record and be able to automate the process and being able to call this by a job queue.

Describe the request

Our client wants to register several documents in the same process and avoid the message since they want it to be automatic.

trigger OnPostDataItem()
    var
        PostedDoc2: Record "Posted Cartera Doc.";
    begin
        if GenJnlLine.Find('-') then
            repeat
                if ArePostedDocs then begin
                    PostedDoc2.SetRange("Document No.", GenJnlLine."Document No.");
                    if PostedDoc2.Find('-') then
                        repeat
                            PostedBillGr.Get(PostedDoc2."Bill Gr./Pmt. Order No.");
                            DocPost.CloseBillGroupIfEmpty(PostedBillGr, PostingDate);
                        until PostedDoc2.Next() = 0;
                end;
            until GenJnlLine.Next() = 0;

        PostGenJournal();
        if ExistVATEntry then begin
            GLReg.FindLast();
            GLReg."From VAT Entry No." := FirstVATEntryNo;
            GLReg."To VAT Entry No." := LastVATEntryNo;
            GLReg.Modify();
        end;

        Commit();
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        IsHandled := true;
        OnBeforeShowCompletionMessage(DocCount, IsHandled);
        if not IsHandled then
            Message(Text1100007, DocCount);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    end;
[IntegrationEvent(false, false)]
local procedure OnBeforeShowCompletionMessage(DocCount: Integer; var IsHandled: Boolean)
begin
end;

Alternatives Evaluated
We cannot evade the message with an alternative because it is not canditioned.

Performance Considerations
Our customer is using this report a lot of times per day and it happens by an automatic process so they need to avoid the message in each register.

Data Sensitivity Review
This event is just asked to skip a dialog window, it will not expose sensitive data.

Multi-Extension Interaction
The only risk is to reactivate the dialog window when it should be deactivated for an automatic process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions