Skip to content

[Event Request] Table 7311 Warehouse Journal Line - OnBeforeGetBinType #28313

@kfuglsang

Description

@kfuglsang

Describe the request

On the table 7311 Warehouse Journal Line, the following procedure exists with no options for extensibility.

    procedure GetBinType(LocationCode: Code[10]; BinCode: Code[20]): Code[10]
    var
        BinType: Record "Bin Type";
    begin
        GetBin(LocationCode, BinCode);
        WhseJnlTemplate.Get("Journal Template Name");
        if WhseJnlTemplate.Type = WhseJnlTemplate.Type::Reclassification then
            if Bin."Bin Type Code" <> '' then
                if BinType.Get(Bin."Bin Type Code") then
                    BinType.TestField(Receive, false);

        exit(Bin."Bin Type Code");
    end;

We would like a new event publisher added here that allows us to replace the logic that finds the Bin Type Code.
The replacement code could look like this.

    procedure GetBinType(LocationCode: Code[10]; BinCode: Code[20]) BinTypeCode: Code[10]
    var
        BinType: Record "Bin Type";
        IsHandled: Boolean;
    begin
        OnBeforeGetBinType(LocationCode, BinCode, BinTypeCode, IsHandled);
        if IsHandled then
            exit(BinTypeCode);
            
        GetBin(LocationCode, BinCode);
        WhseJnlTemplate.Get("Journal Template Name");
        if WhseJnlTemplate.Type = WhseJnlTemplate.Type::Reclassification then
            if Bin."Bin Type Code" <> '' then
                if BinType.Get(Bin."Bin Type Code") then
                    BinType.TestField(Receive, false);

        exit(Bin."Bin Type Code");
    end;

    [IntegrationEvent(false,false)]
    local procedure OnBeforeGetBinType(LocationCode: Code[10]; BinCode: Code[20]; var BinTypeCode: Code[10]; var IsHandled: Boolean)
    begin
    end;

Additional context

We have ongoing On-Prem to Cloud migration projects where this has been identified as a blocker. The customer has customizations in their existing C/AL code base that disables the BinType.TestField(Receive, false) validation since modifications have been made to enable a bin to support receive, put-away, and pick operations simultaneously.

Internal work item: AB#568213

Metadata

Metadata

Assignees

No one assigned

    Labels

    SCMGitHub request for SCM areaextensibility-enhancementNew feature or request related to extensibilityships-in-future-updateFix ships in a future update

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions