Why do you need this change?
After the base case block executes either SplitInternalPutAwayLine or SplitPostedWhseRcptLine, there is no event that allows subscribers to perform additional processing on TempPostedWhseReceiptLine. Container tracking requires a secondary split pass on TempPostedWhseReceiptLine specifically when SourceType = Database::"Posted Whse. Receipt Line" and container tracking is installed. Without an event at this point, this logic must be inserted directly into the base case, requiring a base modification on every upgrade.
Describe the request
Add OnAfterSplitPostedWhseRcptLine immediately after the case block ends, before RemQtyToHandleBase is assigned, so subscribers can perform additional operations on TempPostedWhseReceiptLine for any SourceType.
procedure CreatePutAwayFromDiffSource(PostedWhseRcptLine: Record "Posted Whse. Receipt Line"; SourceType: Integer)
var
TempPostedWhseReceiptLine: Record "Posted Whse. Receipt Line" temporary;
TempPostedWhseReceiptLine2: Record "Posted Whse. Receipt Line" temporary;
ItemTrackingMgt: Codeunit "Item Tracking Management";
RemQtyToHandleBase: Decimal;
IsHandled: Boolean;
begin
case SourceType of
Database::"Whse. Internal Put-away Line":
ItemTrackingMgt.SplitInternalPutAwayLine(PostedWhseRcptLine, TempPostedWhseReceiptLine);
Database::"Posted Whse. Receipt Line":
ItemTrackingMgt.SplitPostedWhseRcptLine(PostedWhseRcptLine, TempPostedWhseReceiptLine);
end;
OnAfterSplitPostedWhseRcptLine(PostedWhseRcptLine, TempPostedWhseReceiptLine, SourceType);
RemQtyToHandleBase := PostedWhseRcptLine."Qty. (Base)";
TempPostedWhseReceiptLine.Reset();
.....
end;
Event Signature:
[IntegrationEvent(false, false)]
local procedure OnAfterSplitPostedWhseRcptLine(
var PostedWhseRcptLine: Record "Posted Whse. Receipt Line";
var TempPostedWhseReceiptLine: Record "Posted Whse. Receipt Line" temporary;
SourceType: Integer)
begin
end;
Alternatives evaluated:
Inserting the container split directly into the Database::"Posted Whse. Receipt Line" of the base case requires a base modification on every upgrade, causes merge conflicts, and violates the AL extensibility rules. No event currently exists after the case block that exposes both TempPostedWhseReceiptLine and SourceType together, leaving direct base modification as the only available option without this change.
Internal work item: AB#638506
Why do you need this change?
After the base
caseblock executes eitherSplitInternalPutAwayLineorSplitPostedWhseRcptLine, there is no event that allows subscribers to perform additional processing onTempPostedWhseReceiptLine. Container tracking requires a secondary split pass onTempPostedWhseReceiptLinespecifically whenSourceType = Database::"Posted Whse. Receipt Line"and container tracking is installed. Without an event at this point, this logic must be inserted directly into the base case, requiring a base modification on every upgrade.Describe the request
Add
OnAfterSplitPostedWhseRcptLineimmediately after the case block ends, beforeRemQtyToHandleBaseis assigned, so subscribers can perform additional operations onTempPostedWhseReceiptLinefor anySourceType.Event Signature:
Alternatives evaluated:
Inserting the container split directly into the
Database::"Posted Whse. Receipt Line"of the base case requires a base modification on every upgrade, causes merge conflicts, and violates the AL extensibility rules. No event currently exists after thecaseblock that exposes bothTempPostedWhseReceiptLineandSourceTypetogether, leaving direct base modification as the only available option without this change.Internal work item: AB#638506