Why do you need this change?
We need to add additional checks before calling CreateNewWhseActivity and change the parameter values inside that procedure.
Describe the request
Please add an event OnBeforeCreateBinContent in Procedure CalcQtyToPutAway
procedure CalcQtyToPutAway(EmptyZoneBin: Boolean; NewBinContent: Boolean)
var
ActionType: Enum "Warehouse Action Type";
ishandled : Boolean;
begin
if CurrLocation."Bin Mandatory" then begin
ActionType := ActionType::Place;
if not EmptyZoneBin and (CurrLocation."Bin Capacity Policy" <> CurrLocation."Bin Capacity Policy"::"Never Check Capacity") then
CalcAvailCubageAndWeight();
AssignQtyToPutAwayForBinMandatory();
end else
QtyToPutAwayBase := PostedWhseReceiptLine."Qty. (Base)";
OnCalcQtyToPutAwayOnAfterSetQtyToPutAwayBase(
PostedWhseReceiptLine, CurrLocation, CurrBin, CrossDockInfo, EmptyZoneBin, QtyToPutAwayBase, EverythingHandled, RemQtyToPutAwayBase, NewBinContent);
QtyToPickBase := QtyToPickBase + QtyToPutAwayBase;
if QtyToPutAwayBase > 0 then begin
OnBeforeCreateBinContent(Location,PostedWhseReceiptLine, CurrBin, QtyToPutAwayBase,ishandled); //<-- new event
ishandled := false;
if not ishandled then begin
LineNo := LineNo + 10000;
if NewBinContent and CurrLocation."Directed Put-away and Pick" then
CreateBinContent(PostedWhseReceiptLine);
CreateNewWhseActivity(
PostedWhseReceiptLine, CurrWarehouseActivityLine, ActionType, LineNo,
0, QtyToPutAwayBase, true, false, EmptyZoneBin, false)
end;
end
end;
Event signature:
[integrationEvent(false, false)]
local procedure OnBeforeCreateBinContent(Location: Record Location; PostedWhseReceiptLine: Record "Posted Whse. Receipt Line"; CurrBin: Record Bin; QtyToPutAwayBase: Decimal; var IsHandled: Boolean)
begin
end;
Why do you need this change?
We need to add additional checks before calling CreateNewWhseActivity and change the parameter values inside that procedure.
Describe the request
Please add an event OnBeforeCreateBinContent in Procedure CalcQtyToPutAway
Event signature: