Skip to content

[W1][Report][7380][Calculate Phys. Invt. Counting] Add integration event OnBeforeGetRequest in GetRequest procedure before standard field assignments #30117

@mavohra

Description

@mavohra

Why do you need this change?

We need to extend the GetRequest procedure in the Calculate Phys. Invt. Counting report to expose an additional output parameter beyond what the standard signature provides. The standard GetRequest procedure returns only PostingDate, NextDocNo, SortingMethod, PrintDoc, PrintDocPerItem, ZeroQty, and ShowQtyCalculated, with no extensibility hook, preventing subscribers from retrieving additional request page fields without overriding the entire procedure.

All callers of GetRequest depend on the values populated by this procedure to drive posting behavior. There is no way for callers to retrieve additional request state such as ZeroCount through the standard procedure signature, as the parameter does not exist in the base implementation.

No event currently exists inside GetRequest that exposes the procedure's output parameters and allows subscribers to populate additional values or take over the assignment logic entirely.

Describe the request

Add an integration event OnBeforeGetRequest in the GetRequest procedure of the Calculate Phys. Invt. Counting report before the standard field assignments, allowing subscribers to populate additional output parameters and optionally skip the standard assignments via IsHandled.

procedure GetRequest(var PostingDate2: Date; var NextDocNo2: Code[20]; var SortingMethod2: Option " ",Item,Bin; var PrintDoc2: Boolean; var PrintDocPerItem2: Boolean; var ZeroQty2: Boolean; var ShowQtyCalculated2: Boolean): Boolean
var
    ZeroCount: Boolean;
    IsHandled: Boolean;
begin
    IsHandled := false;
    OnBeforeGetRequest(PostingDate2, NextDocNo2, SortingMethod2, PrintDoc2, PrintDocPerItem2, ZeroQty2, ShowQtyCalculated2, ZeroCount, IsHandled); 
    if IsHandled then
        exit(OKPressed);
    PostingDate2 := PostingDate;
    NextDocNo2 := NextDocNo;
    SortingMethod2 := SortingMethod;
    PrintDoc2 := PrintDoc;
    PrintDocPerItem2 := PrintDocPerItem;
    ZeroQty2 := ZeroQty;
    ShowQtyCalculated2 := ShowQtyCalculated;
    exit(OKPressed);
end;

Event Signature:

[IntegrationEvent(false, false)]
local procedure OnBeforeGetRequest(var PostingDate2: Date; var NextDocNo2: Code[20]; var SortingMethod2: Option " ",Item,Bin; var PrintDoc2: Boolean; var PrintDocPerItem2: Boolean; var ZeroQty2: Boolean; var ShowQtyCalculated2: Boolean; var ZeroCount: Boolean; var IsHandled: Boolean)
begin
end;

Alternatives evaluated:
No event currently exists inside GetRequest that exposes all output parameters together with an IsHandled flag. Subscribers cannot retrieve additional request page state such as ZeroCount through any existing event, nor can they skip the standard field assignments without overriding the procedure entirely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions