Table 901 "Assembly Line" procedure MaxQtyToConsume() - new event OnAfterMaxQtyToConsume, procedure MaxQtyToConsumeBase() - new event OnAfterMaxQtyToConsumeBase
Why do you need this change?
The customer requests to include a new field on the "Assemble Line" record in the calculation of the MaxQtyToConsume and MaxQtyToConsumeBase values. The new fields were created by customizing the "Assembly Line" table.
Describe the request
procedure MaxQtyToConsume() MaxQty: Decimal
begin
MaxQty := "Remaining Quantity";
OnAfterMaxQtyToConsume(Rec, xRec, MaxQty);
end;
local procedure MaxQtyToConsumeBase() MaxQtyBase: Decimal
begin
MaxQtyBase := "Remaining Quantity (Base)";
OnAfterMaxQtyToConsumeBase(Rec, xRec, MaxQtyBase);
end;
[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsume(Rec: Record "Assembly Line"; xRec: Record "Assembly Line"; var MaxQtyToConsume: Decimal)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsumeBase(Rec: Record "Assembly Line"; xRec: Record "Assembly Line"; var MaxQtyToConsumeBase: Decimal)
begin
end;
Internal work item: AB#640855
Hi @ACJStopka,
Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.
Missing Information:
- Justification for
xRecparameters: Please explain why subscribers need previous values (xRec) inOnAfterMaxQtyToConsumeandOnAfterMaxQtyToConsumeBase, instead of only the currentAssembly Linerecord and the calculated result.
Please update the issue with the missing details. We'll automatically re-analyze once updated.
[!NOTE] Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
[!TIP] Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.
xRec is not needed
✅ Analysis complete - ready for further processing
Implementation:
Add OnAfterMaxQtyToConsume and OnAfterMaxQtyToConsumeBase integration events to table 901 Assembly Line after the default values are assigned in MaxQtyToConsume() and MaxQtyToConsumeBase().
Location in MaxQtyToConsume() and MaxQtyToConsumeBase() procedures:
procedure MaxQtyToConsume() Result: Decimal
begin
Result := "Remaining Quantity";
OnAfterMaxQtyToConsume(Rec, Result);
end;
local procedure MaxQtyToConsumeBase() Result: Decimal
begin
Result := "Remaining Quantity (Base)";
OnAfterMaxQtyToConsumeBase(Rec, Result);
end;
Event Publisher (add at the end of the codeunit with other events):
[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsume(var AssemblyLine: Record "Assembly Line"; var MaxQtyToConsume: Decimal)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterMaxQtyToConsumeBase(var AssemblyLine: Record "Assembly Line"; var MaxQtyToConsumeBase: Decimal)
begin
end;
File: AssemblyLine.Table.al
[!NOTE] Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
[!TIP] Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.