Skip to content

[Event Request] [W1][Report][7000096][Redraw Receivable Bills] trigger OnPreReport #29604

@jcarrascolbt

Description

@jcarrascolbt

Why do you need this change?

We need this event to be able to assign the requestpage variables without needing to show it to the user and also, if necessary, to be able to skip the control that retrieves the journal batch to automate it.

Describe the request

Our cliente want to be able to assign variables to the request page and be able to skip the error message to make a custom manage for that.

trigger OnPreReport()
begin
    if NewDueDate = 0D then
        Error(Text1100000);

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
IsHandled := false;
OnBeforeOnPreReport(PostingDate, NewDueDate, NewPmtMethod, IncludeDiscCollExpenses, IncludeRejExpenses, IncludeFinanceCharges, TemplName, BatchName, IsHandled,);
    if not IsHandled then
        if not GenJnlBatch.Get(TemplName, BatchName) then
            Error(Text1100001);
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
end;
[IntegrationEvent(false, false)]
local procedure OnBeforeOnPreReport(var PostingDate: Date; var NewDueDate: Date; var NewPmtMethod: Code[10]; var IncludeDiscCollExpenses: Boolean; var IncludeRejExpenses: Boolean; var IncludeFinanceCharges: Boolean; var TemplName: Code[10]; var BatchName: Code[10]; var IsHandled: Boolean)
begin
end;

Alternatives Evaluated
We have tried to use alternatives to avoid making the change, but we don't see a way to assign the variables from the request page.

Performance Considerations
This code will not negatively affect performance, we just need it to assign some variables to make this automatic.

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. Also there are a control that if u put the data in the GenJnlBatch ant try to make a get, BC doesnt get the right journal batch, so we need to be able to skip the comprobation
Internal work item: AB#618758

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaevent-requestRequest for adding an eventships-in-future-updateFix ships in a future update

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions