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 Change Request] Codeunit 7302 "WMS Management" - OnBeforeGetWrongPickPutAwayQtyErrorText #28194

Open
iamcgomes opened this issue Feb 21, 2025 · 0 comments

Comments

@iamcgomes
Copy link

Describe the request

Could you please add the following parameters to the event OnBeforeGetWrongPickPutAwayQtyErrorText in Codeunit 7302 "WMS Management"?

Current

    local procedure GetWrongPickPutAwayQtyErrorText(WarehouseActivityLine: Record "Warehouse Activity Line"; var WarehouseActivityLine3: Record "Warehouse Activity Line"; QtyToPick: Decimal; QtyToPutAway: Decimal) ErrorText: Text[250]
    var
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeGetWrongPickPutAwayQtyErrorText(WarehouseActivityLine3, QtyToPick, QtyToPutAway, ErrorText, IsHandled);
        if IsHandled then
            exit(ErrorText);

        if WarehouseActivityLine3.TrackingFilterExists() then
            ErrorText :=
              StrSubstNo(
                Text016,
                WarehouseActivityLine.FieldCaption("Item No."), WarehouseActivityLine."Item No.",
                WarehouseActivityLine.FieldCaption("Variant Code"), WarehouseActivityLine."Variant Code",
                WarehouseActivityLine.FieldCaption("Lot No."), WarehouseActivityLine."Lot No.",
                WarehouseActivityLine.FieldCaption("Serial No."), WarehouseActivityLine."Serial No.",
                QtyToPick, QtyToPutAway)
    ...
}
    [IntegrationEvent(false, false)]
    local procedure OnBeforeGetWrongPickPutAwayQtyErrorText(var WhseActivLine: Record "Warehouse Activity Line"; QtyToPick: Decimal; QtyToPutAway: Decimal; var ErrorTxt: Text[250]; var IsHandled: Boolean)
    begin
    end;

Requested

    local procedure GetWrongPickPutAwayQtyErrorText(WarehouseActivityLine: Record "Warehouse Activity Line"; var WarehouseActivityLine3: Record "Warehouse Activity Line"; QtyToPick: Decimal; QtyToPutAway: Decimal) ErrorText: Text[250]
    var
        IsHandled: Boolean;
    begin
        IsHandled := false;
        OnBeforeGetWrongPickPutAwayQtyErrorText(WarehouseActivityLine3, QtyToPick, QtyToPutAway, ErrorText, IsHandled, WarehouseActivityLine); //Modified
        if IsHandled then
            exit(ErrorText);

        if WarehouseActivityLine3.TrackingFilterExists() then
            ErrorText :=
              StrSubstNo(
                Text016,
                WarehouseActivityLine.FieldCaption("Item No."), WarehouseActivityLine."Item No.",
                WarehouseActivityLine.FieldCaption("Variant Code"), WarehouseActivityLine."Variant Code",
                WarehouseActivityLine.FieldCaption("Lot No."), WarehouseActivityLine."Lot No.",
                WarehouseActivityLine.FieldCaption("Serial No."), WarehouseActivityLine."Serial No.",
                QtyToPick, QtyToPutAway)
    ...
}
    //> Modified
    [IntegrationEvent(false, false)]
    local procedure OnBeforeGetWrongPickPutAwayQtyErrorText(var WhseActivLine: Record "Warehouse Activity Line"; QtyToPick: Decimal; QtyToPutAway: Decimal; var ErrorTxt: Text[250]; var IsHandled: Boolean; WarehouseActivityLine: Record "Warehouse Activity Line")
    begin
    end;
    //< Modified

Additional context

We need to apply some validations with the "WarehouseActivityLine" parameter.

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