Why do you need this change?
Some of our customers want each production order line picked as its own warehouse activity line rather than all lines for an order grouped together. SetCustomWhseSourceLine is called with a hardcoded grouping number of 1 for every component, so it is currently impossible to influence how pick lines get grouped without replacing the whole call. There is no event before this call that exposes the grouping number for a subscriber to change.
Describe the request
Add a publisher immediately before CreatePick.SetCustomWhseSourceLine is called, with a var parameter for the grouping number, so a subscriber can change how pick lines for the same production order are grouped.
if QtyToPick > 0 then begin
LineNo := 1;
OnBeforeSetCustomWhseSourceLineOnBeforeSetLineNo("Prod. Order Component", LineNo);
CreatePick.SetCustomWhseSourceLine(
"Prod. Order Component", LineNo,
Database::"Prod. Order Component", Status.AsInteger(), "Prod. Order No.", "Prod. Order Line No.", "Line No.");
...
Event Signature:
[IntegrationEvent(false, false)]
local procedure OnBeforeSetCustomWhseSourceLineOnBeforeSetLineNo(ProdOrderComponent: Record "Prod. Order Component"; var LineNo: Integer)
begin
end;
Alternatives evaluated:
- Subscribing to OnAfterSetCustomWhseSourceLine on codeunit "Create Pick": fires after the grouping number is already copied into the codeunit's internal TempNo field, and the event does not expose that field, so nothing can change it there.
Internal work item: AB#645233
Why do you need this change?
Some of our customers want each production order line picked as its own warehouse activity line rather than all lines for an order grouped together.
SetCustomWhseSourceLineis called with a hardcoded grouping number of 1 for every component, so it is currently impossible to influence how pick lines get grouped without replacing the whole call. There is no event before this call that exposes the grouping number for a subscriber to change.Describe the request
Add a publisher immediately before CreatePick.SetCustomWhseSourceLine is called, with a var parameter for the grouping number, so a subscriber can change how pick lines for the same production order are grouped.
Event Signature:
Alternatives evaluated:
Internal work item: AB#645233